Click here to Skip to main content
15,898,747 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: Article for STL Pin
Cedric Moonen23-Aug-05 1:55
Cedric Moonen23-Aug-05 1:55 
GeneralRe: Article for STL Pin
toxcct23-Aug-05 2:36
toxcct23-Aug-05 2:36 
GeneralRe: Article for STL Pin
ThatsAlok23-Aug-05 3:11
ThatsAlok23-Aug-05 3:11 
QuestionDeciding STL list element type at runtime? Pin
johtib21-Aug-05 20:15
johtib21-Aug-05 20:15 
AnswerRe: Deciding STL list element type at runtime? Pin
toxcct21-Aug-05 22:56
toxcct21-Aug-05 22:56 
GeneralRe: Deciding STL list element type at runtime? Pin
Roland Pibinger21-Aug-05 23:35
Roland Pibinger21-Aug-05 23:35 
GeneralRe: Deciding STL list element type at runtime? Pin
toxcct21-Aug-05 23:50
toxcct21-Aug-05 23:50 
GeneralRe: Deciding STL list element type at runtime? Pin
Stuart Dootson22-Aug-05 22:34
professionalStuart Dootson22-Aug-05 22:34 
No, that won't work. You need pointers to Types (or references, but you can't put those in containers) in order to use polymorphism. Use something like:

<br />
list<Type*> theList;<br />
theList.push_back(new Int(5));<br />
theList.push_back(new Float(2.1));<br />


Of course, you need to manage the pointers so that the memory's not leaked (storing boost::shared_ptr<Type> would be my preferred approach)

Stuart Dootson

'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
GeneralRe: Deciding STL list element type at runtime? Pin
Axter23-Aug-05 23:01
professionalAxter23-Aug-05 23:01 
GeneralRe: Deciding STL list element type at runtime? Pin
Stuart Dootson23-Aug-05 23:10
professionalStuart Dootson23-Aug-05 23:10 
GeneralWhat's the diff between ALT and COM Pin
Axter17-Aug-05 15:01
professionalAxter17-Aug-05 15:01 
GeneralRe: What's the diff between ALT and COM Pin
Christian Graus17-Aug-05 16:27
protectorChristian Graus17-Aug-05 16:27 
GeneralRe: What's the diff between ALT and COM Pin
geo_m18-Aug-05 20:00
geo_m18-Aug-05 20:00 
GeneralRe: What's the diff between ALT and COM Pin
Jörgen Sigvardsson21-Aug-05 10:25
Jörgen Sigvardsson21-Aug-05 10:25 
GeneralRe: What's the diff between ALT and COM Pin
ThatsAlok22-Aug-05 22:33
ThatsAlok22-Aug-05 22:33 
GeneralWTL, CString and std::string... Pin
S/Madjid16-Aug-05 5:25
S/Madjid16-Aug-05 5:25 
GeneralRe: WTL, CString and std::string... Pin
Steve S16-Aug-05 6:23
Steve S16-Aug-05 6:23 
GeneralRe: WTL, CString and std::string... Pin
Rob Caldecott16-Aug-05 11:54
Rob Caldecott16-Aug-05 11:54 
GeneralRe: WTL, CString and std::string... Pin
Jörgen Sigvardsson16-Aug-05 13:18
Jörgen Sigvardsson16-Aug-05 13:18 
GeneralRe: WTL, CString and std::string... Pin
S/Madjid16-Aug-05 23:59
S/Madjid16-Aug-05 23:59 
GeneralRe: WTL, CString and std::string... Pin
Rob Caldecott17-Aug-05 0:23
Rob Caldecott17-Aug-05 0:23 
GeneralRe: WTL, CString and std::string... Pin
Rob Caldecott17-Aug-05 0:17
Rob Caldecott17-Aug-05 0:17 
GeneralRe: WTL, CString and std::string... Pin
Jörgen Sigvardsson17-Aug-05 9:42
Jörgen Sigvardsson17-Aug-05 9:42 
GeneralRe: WTL, CString and std::string... Pin
Rob Caldecott17-Aug-05 11:22
Rob Caldecott17-Aug-05 11:22 
QuestionIs there anyway to disable IE's image displaying? Pin
Member 186720216-Aug-05 4:53
Member 186720216-Aug-05 4:53 

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.