CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Muthuveerappan

Page 1 of 14 1 2 3 4

Search: Search took 0.04 seconds.

  1. Replies
    2
    Views
    638

    Re: static function

    Thanks Laserlight, you are rite

    I was just going through Cocoa (Objective C's framework) and saw the method alloc which was inherited from the base class (NSObject) and seemed it was something...
  2. Replies
    2
    Views
    638

    static function

    Hi,

    In the below example, inside the implementation of the static function f1 is there a way to determine whether A::f1() or B::f1() invoked f1 ?



    class A
    {
    public:
    static A*...
  3. Replies
    3
    Views
    757

    Re: Very basic question

    Yes GCDEF is correct.

    Just thought i would add some points (correct me if i am wrong):
    1) C-Strings

    C-Strings are treated as an array of characters ending with a null character '\0'
    C-String...
  4. Replies
    4
    Views
    766

    Re: static member initialization

    Thanks Skizmo and Philip, I am just a bit confused with definition vs initialization.

    The reason I am confused is that because the below mentioned program compiles successfully (a1 is not defined...
  5. Re: access specifier of base virtual function

    Thanks superbonzo for clarifying that
  6. Re: access specifier of base virtual function

    Thanks Nuzzle, I suppose it is better to treat it as a feature of C++ since i am not fully aware of what goes behind the scene.
  7. Replies
    4
    Views
    766

    static member initialization

    Hi,

    My understanding was that all static data members in a class needs to be initialized.

    In one of the programs, I forgot to initialize a static composite data member (what i mean by composite...
  8. Re: access specifier of base virtual function

    As per my understanding (correct me if i am wrong):

    1) Yes B inherits A, but display() is a function that belongs to A and is only inherited by B.

    It was possible for A::display() to invoke...
  9. Re: access specifier of base virtual function

    Laserlight - Yes you are correct, my 2nd example follows LSP.

    I found it interesting that B::f1() could be accessed outside of class B. In this case class A::display() (base class function)...
  10. Re: access specifier of base virtual function

    Thanks Nuzzle and Laserlight

    Just to summarize the reason how this happened:
    1) Access is checked by the compiler at compile time, the fact that it is A::f1() public allows the compiler to let it...
  11. Re: access specifier of base virtual function

    Thanks Laserlight, I agree that the design doesn't follow the Liskov substitution principle.

    However my question is:
    B::f1() is private and shouldn't be accessible outside the class B, however i...
  12. Re: re-assigning a non-pointer object variable

    As per my understanding (I could be completely wrong, so feel to correct me)
    - BaseClass is used by multiple teams.
    - you want to use the same BaseClass but want to use it DerivedUtil instead of...
  13. access specifier of base virtual function

    Hi,

    A is the base class
    B is the derived from class A

    A has a public virtual function f1()
    B has a private virtual function f1()

    B::f1() not accessible using an object of class B however...
  14. Re: Creating function pointer to std::endl

    Thank you so much !! I was breaking my head over it for a long time...
  15. Creating function pointer to std::endl

    Hi,

    I am trying to create a function pointer to std::endl

    I get a compilation error in line number 36, where I am trying to assign the function pointer of std::endl to a pointer variable.
    ...
  16. Thread: time_t

    by Muthuveerappan
    Replies
    12
    Views
    14,832

    Re: time_t

    Thanks a lot !!

    Just feel timeb might be compiler specific (I could be completely wrong)

    We are working on mac and windows... so i thought it would be better to use boost library (posix time)....
  17. Thread: time_t

    by Muthuveerappan
    Replies
    12
    Views
    14,832

    Re: time_t

    Thanks
    ------------
    Thanks a lot !!

    gmtime actually resolves the problem because it is the GMT time

    I did check timezone, tzname[0], tzname[1], it doesn't show the correct names, but thats...
  18. Thread: time_t

    by Muthuveerappan
    Replies
    12
    Views
    14,832

    Re: time_t

    Thanks a ton !! I wouldn't have guessed that in my dreams !!

    Windows shows it as 8....

    Strange it actually needs to be 8hrs .... :) not sure why it is 7:30 ... though the timezone is properly...
  19. Thread: time_t

    by Muthuveerappan
    Replies
    12
    Views
    14,832

    time_t

    Hi,

    I have a doubt regarding time_t

    I am initializing a time_t variable to 0.
    When I display it, it shows "Thu Jan 1 07:30:00 1970" ?
    I expected it to Thu Jan 1 00:0:00 1970 since t1 was...
  20. Boost Graph Library - Accessing a vertex

    Hi,

    I am a newbie to boost graph library (BGL).

    1) To build a graph with vertices with unique ids - Able to do this
    2) To get the vertex containing a specific idsI have created a graph with...
  21. Re: To check if a point is inside a polygon

    Thanks a ton !!

    Will go through them and come back with the doubts that I have.

    Thanks again all of you !!
  22. To check if a point is inside a polygon

    Hi,

    I am looking for a Library / function / formula to check if a point is inside a polygon.

    Assuming the polygon has N sides, and the co-ordinates are given of each vertex is given.
    Also the...
  23. Re: check if a variable is inside a set of values

    Thank you so much for all your replies.

    I had this vague view that there was a function called "any" ... hahah .. I was so wrong.

    I suppose std :: find would suit my needs.

    Thanks all
    Muthu
  24. check if a variable is inside a set of values

    Hi

    I wanted to know if there was a way to check if a variable was inside a set of values.

    Like in the below given example, I want to know if n1 is either 5, 8, 27 or 2567
    Is there a better way...
  25. Re: boost thread - shared_mutex and condition variable

    Thanks a lot Codeplug, will read through that article and come back.

    Yeah I wish boost had more detailed documentation on how and in what situations to use them.

    Thanks again,
    Muthu
Results 1 to 25 of 327
Page 1 of 14 1 2 3 4





Click Here to Expand Forum to Full Width

Featured