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

Search:

Type: Posts; User: sgiri1981

Page 1 of 2 1 2

Search: Search took 0.06 seconds.

  1. Replies
    7
    Views
    1,488

    Re: re-assigning a non-pointer object variable

    Thanks Muthuveerappan.
    This still requires changing the code of BaseClass (the current implementation does not have an overloaded constructor.
    I guess it is just poor design that I am dealing with,...
  2. Replies
    7
    Views
    1,488

    Re: re-assigning a non-pointer object variable

    Thanks for your inputs.

    The reason I am inheriting is for code management. I am using the classes made available to me by other teams; these classes are typically large files. I need to make...
  3. Replies
    7
    Views
    1,488

    re-assigning a non-pointer object variable

    Hi All,

    I am working on a project that has a large base class that uses a baseUtil class:


    Class BaseClass
    {
    public:
    BaseUtil m_baseUtil;
    }
  4. Replies
    6
    Views
    6,135

    Re: Making a DLL, How??

    Check this out:
    http://msdn.microsoft.com/en-us/library/1ez7dh12(VS.71).aspx

    sgiri
  5. Thread: destructors

    by sgiri1981
    Replies
    10
    Views
    1,018

    Re: destructors

    :) :) :)

    That worked!!!

    Here is what I think was happening (from Lindley's response in the earlier thread)

    I have such a hierarchy: Base, Derived1, Derived2, Derived3.

    The destructor in...
  6. Thread: destructors

    by sgiri1981
    Replies
    10
    Views
    1,018

    Re: destructors

    Thats exactly what I m doing!
    But some other classes up in the hierarchy (before the most-base class) are doing it the same way.

    Only my class's immediate base does not have any. All classes...
  7. Thread: destructors

    by sgiri1981
    Replies
    10
    Views
    1,018

    Re: destructors

    Have to toss this thread as I encountered a weird thing.

    In the hierarchy of classes I mentioned, the base most class has a destructor that is virtual. The 2 most derived classes do not have...
  8. Replies
    23
    Views
    1,886

    Re: Inline Members

    Thanks laserlight!
    May I ask you the source of the c++ standard and is it readable for beginner/intermediate level programmer? (Google threw up some sites which were a little advanced for me)
    ...
  9. Replies
    19
    Views
    1,486

    Re: Instantiating before the body is called?

    Thanks Paul. That was very helpful.

    Continuing on this theme, lets say I have 2 members, one with and one without default constructor. The one without a default constructor MUST appear in the...
  10. Replies
    19
    Views
    1,486

    Re: Instantiating before the body is called?

    [QUOTE=laserlight;1850269]
    The use of an initialisation list would be necessary in some cases, e.g., to initialise const and reference member variables and those of types without a default...
  11. Replies
    23
    Views
    1,886

    Re: Inline Members

    This has been a great thought provoking thread, with the kind of discussions not found in any book.

    Anyway, my chain of thoughts led me to wonder whats the difference between the following


    ...
  12. Replies
    23
    Views
    1,886

    Re: Inline Members

    I always thought that the stuff in header file (class name, its members function etc) is a declaration whereas the definitions are the details of those declarations that go in .cpp file. Is it...
  13. Replies
    12
    Views
    2,221

    Re: What are the best debugging resources?

    Is that in Visual Studio? I dont see any such menu. (I use Visual Studio 6 (Enterprise)

    I somehow havent yet developed a liking for Visual Studio. I know its a de facto environment for c++ but I...
  14. Thread: destructors

    by sgiri1981
    Replies
    10
    Views
    1,018

    Re: destructors

    Hi GCDEF,
    I was still composing my earlier reply (and cross-referencing my code and c++ book) and didnt see your reply.
    This explains it.
    Thanks a lot.

    best,
    sgiri
  15. Thread: destructors

    by sgiri1981
    Replies
    10
    Views
    1,018

    Re: destructors

    Thanks for the explanation.

    I just checked the base-most class - the destructor is virtual. So, that takes care of this class and all classes up its hierarchy.

    However, for its members that...
  16. Replies
    12
    Views
    2,221

    Re: What are the best debugging resources?

    How do you monitor memory leaks? (this might help me find answer to a question I just posted)

    Thanks,
    sgiri
  17. Thread: destructors

    by sgiri1981
    Replies
    10
    Views
    1,018

    destructors

    Hi,
    I have a hierarchical design of a class, say: BaseProcess, ....., MyXXXProcess.
    The most derived class is not given a destructor. In this class, I m creating a array of another class, say...
  18. Replies
    13
    Views
    1,516

    Re: multiple instances of a class

    Yes. However, it took me more than 5 hours to learn this- I looked at all other possible places for error, pored over the other concepts.

    Experience is what you get when you dont get what you...
  19. Replies
    13
    Views
    1,516

    Re: multiple instances of a class

    Thanks for your comments. I tried a few approaches and realized that I cant do this because
    1. I dont want to construct this second object
    2. The '=' operator in this object was not working (it...
  20. Replies
    13
    Views
    1,516

    Re: multiple instances of a class

    Sorry about that. I was just trying to post the sections of code that I suspected of having problems and thereby avoid unnecessarily large post with unrelated code. I was mistaken and I apologize as...
  21. Replies
    13
    Views
    1,516

    Re: multiple instances of a class

    Here is the code: (its a long header file and I had to cut down on other details. Also, I had to change some names as this is a client's proprietary code)


    class __IMP_EXP MyClass : public...
  22. Replies
    13
    Views
    1,516

    multiple instances of a class

    Dear All,
    I m trying to use a class that does not have a default constructor. For this class, i m unable to declare 2 instances.

    eg:
    option 1 (successful compilation)
    MyClass obj1; // ok
    ...
  23. Re: writing code using base class, passing derived class instances

    Thanks for your response!
    MyClass has a virtual destructor, so I guess those who wrote it did intend for it to be used as a polymorphic base class. In that case, I will go ahead with...
  24. Re: writing code using base class, passing derived class instances

    Hi All,
    I was searching for some answers to my question and this thread seems relevant; so I m tossing it up from the past.

    Briefly, my code is as follows:
    MyProcess.h
    MyProcess.cpp
    ...
  25. makefiles and associations between .h and .cpp

    Dear All,
    We have been provided libraries to work with. If any change is required to any definition, I see that in the past, programmers have copied the .cpp file from the library folder into the...
Results 1 to 25 of 28
Page 1 of 2 1 2





Click Here to Expand Forum to Full Width

Featured