Excuse me again.
I dont talk about the constructor of the object instantiated.
I'm going to explain my doubts again.
I have my ClassA with its .h and .cpp file.
I have my ClassB with its .h and .cpp file
I want to have an object of classB inside classA.
ok. The code I have to write at ClassA.h is :
1.- #include classB.h
2.- ClasssB class_b_to_create; (public or private)
ok. now at ClassA.cpp :
Have I to write again ClasssA class_a_to_create at the beggining of the file? (just before the constructor). I dont know if it is neccesary.
In this case, when I run the program which is the place where the objetc of classb created?
And by last, How can I reset the classb created? I want to have the posibility of to do it inside a method : for example
1 2 3
|
MyclassA::reset_class_b_created()
{ ClasssB class_b_to_create;
}
|
But this create a private class_b_to_create with MyclassA::reset_class_b scope.
I hope now you understand me.
Thanks