Type: Posts; User: sgiri1981
Search took 0.01 seconds.
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,...
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...
I am working on a project that has a large base class that uses a baseUtil class:
June 13th, 2009, 06:49 AM
Check this out:
June 11th, 2009, 10:15 PM
:) :) :)
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...
June 11th, 2009, 07:02 PM
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...
June 11th, 2009, 06:10 PM
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...
June 11th, 2009, 10:35 AM
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)
June 11th, 2009, 10:17 AM
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...
June 11th, 2009, 07:02 AM
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...
June 11th, 2009, 06:50 AM
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
June 10th, 2009, 06:50 AM
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...
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...
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.
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...
How do you monitor memory leaks? (this might help me find answer to a question I just posted)
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...
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...
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...
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...
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...
I m trying to use a class that does not have a default constructor. For this class, i m unable to declare 2 instances.
option 1 (successful compilation)
MyClass obj1; // ok
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...
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:
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...
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!