Click here to Skip to main content
15,899,126 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: What I am trying to do [modified] Pin
CPP_Student31-Jul-06 10:33
CPP_Student31-Jul-06 10:33 
GeneralRe: What I am trying to do Pin
Zac Howland31-Jul-06 10:57
Zac Howland31-Jul-06 10:57 
GeneralRe: Should I learn ATL/COM now? Pin
Kevin McFarlane31-Jul-06 10:52
Kevin McFarlane31-Jul-06 10:52 
GeneralRe: Should I learn ATL/COM now? Pin
Zac Howland31-Jul-06 11:11
Zac Howland31-Jul-06 11:11 
GeneralRe: Should I learn ATL/COM now? Pin
Kevin McFarlane1-Aug-06 0:42
Kevin McFarlane1-Aug-06 0:42 
GeneralTo Zac Pin
CPP_Student31-Jul-06 12:36
CPP_Student31-Jul-06 12:36 
Questionvector -- call methods from inheritance classes [modified] Pin
RealWood30-Jul-06 4:56
RealWood30-Jul-06 4:56 
GeneralRe: vector -- call methods from inheritance classes Pin
Justin Tay30-Jul-06 5:46
Justin Tay30-Jul-06 5:46 
SodomFighter666 wrote:
I know, that the vector needs a base class of all my object


Base class pointer. Only if for some reason you need to keep all of them in the same collection (ie, they all support a particular interface), in which case the exact type shouldn't matter to you. If their actual types do matter, then you should have a pretty good reason for putting them in the same collection. Your base class should also have a virtual destructor.

vector<Basis*> V;
A *a = new A;
V.push_back(a);
V[0]->reset();
for(vector<Basis*>::iterator i = V.begin(); i != V.end(); i++)
{
  delete *i;
}


SodomFighter666 wrote:
I know that the STL-Vector work with templates, so the call 'V.insert(V.begin(), a);' transforme the object a to the instance of 'Basis'.


You might want to note the distinction between making a copy of an object, and storing a pointer to an object.

SodomFighter666 wrote:
... and special methods (like 'A::loadGUI()')?


So what is the reason loadGUI isn't a virtual member of your Basis class? If you still want to do something like this you would have to have a method on Basis that can tell you at runtime what kind of derived class pointer it is and cast it to that class.
GeneralRe: vector -- call methods from inheritance classes Pin
RealWood30-Jul-06 8:09
RealWood30-Jul-06 8:09 
GeneralRe: vector -- call methods from inheritance classes [modified] Pin
Justin Tay30-Jul-06 10:37
Justin Tay30-Jul-06 10:37 
GeneralRe: vector -- call methods from inheritance classes [modified] Pin
Zac Howland31-Jul-06 9:03
Zac Howland31-Jul-06 9:03 
GeneralRe: vector -- call methods from inheritance classes Pin
RealWood31-Jul-06 11:32
RealWood31-Jul-06 11:32 
QuestionHow to CComBSTR convert to char *? Pin
alan top29-Jul-06 2:49
alan top29-Jul-06 2:49 
AnswerRe: How to CComBSTR convert to char *? Pin
Monty229-Jul-06 21:36
Monty229-Jul-06 21:36 
GeneralRe: How to CComBSTR convert to char *? Pin
Jörgen Sigvardsson30-Jul-06 9:21
Jörgen Sigvardsson30-Jul-06 9:21 
AnswerRe: How to CComBSTR convert to char *? Pin
Michael Dunn29-Jul-06 23:24
sitebuilderMichael Dunn29-Jul-06 23:24 
AnswerRe: How to CComBSTR convert to char *? Pin
Zac Howland31-Jul-06 8:37
Zac Howland31-Jul-06 8:37 
GeneralRe: How to CComBSTR convert to char *? Pin
Jörgen Sigvardsson1-Aug-06 12:27
Jörgen Sigvardsson1-Aug-06 12:27 
QuestionScrolling Woes. Pin
HakunaMatada28-Jul-06 23:21
HakunaMatada28-Jul-06 23:21 
AnswerRe: Scrolling Woes. Pin
Monty229-Jul-06 21:38
Monty229-Jul-06 21:38 
GeneralRe: Scrolling Woes. Pin
HakunaMatada30-Jul-06 18:40
HakunaMatada30-Jul-06 18:40 
QuestionAbout IE 7 Tabs Pin
JaydeepB26-Jul-06 21:46
JaydeepB26-Jul-06 21:46 
AnswerRe: About IE 7 Tabs Pin
JaydeepB27-Jul-06 21:25
JaydeepB27-Jul-06 21:25 
GeneralRe: About IE 7 Tabs Pin
HunterNet19-Aug-06 5:16
HunterNet19-Aug-06 5:16 
QuestionCoCreateInstance() return E_OUTOFMEMORY Pin
chenxiujie26-Jul-06 19:43
chenxiujie26-Jul-06 19:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.