Click here to Skip to main content
15,892,839 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: casting stl::vector confusion... Pin
El Corazon15-Jan-07 4:59
El Corazon15-Jan-07 4:59 
GeneralRe: casting stl::vector confusion... Pin
yeti1115-Jan-07 11:57
yeti1115-Jan-07 11:57 
GeneralRe: casting stl::vector confusion... Pin
El Corazon15-Jan-07 15:00
El Corazon15-Jan-07 15:00 
GeneralRe: casting stl::vector confusion... Pin
Stephen Hewitt15-Jan-07 12:37
Stephen Hewitt15-Jan-07 12:37 
GeneralRe: casting stl::vector confusion... Pin
Stephen Hewitt15-Jan-07 12:02
Stephen Hewitt15-Jan-07 12:02 
GeneralRe: casting stl::vector confusion... Pin
yeti1115-Jan-07 12:16
yeti1115-Jan-07 12:16 
GeneralRe: casting stl::vector confusion... Pin
Stephen Hewitt15-Jan-07 16:00
Stephen Hewitt15-Jan-07 16:00 
GeneralRe: casting stl::vector confusion... [modified] Pin
yeti1115-Jan-07 18:21
yeti1115-Jan-07 18:21 
"It was not my intention to encourage bad design."

Well, we shall see, i'll gladly post the results here Wink | ;) I know it is
hack but it saves so much complications, not to mention that it keeps
code nice and clean, alternative i was thinking about is to do my own
template that would internally store vector<mybase*> but on the
outside casts will be made on [] and at(). Instead of storing pointer
to this "wrapper" template i will store pointer to internal vector and
as internally the type is allways the same, but on the outside it is
still used as it was. In any case this is gonna be firmly tested, if
it fails i'll know.

imho, as far as i can logically think about the cast, there should be nothing
wrong with it. Actually i am casting from vector<dword>* to vector<dword>*
GeneralRe: casting stl::vector confusion... Pin
Stephen Hewitt15-Jan-07 18:27
Stephen Hewitt15-Jan-07 18:27 
GeneralRe: casting stl::vector confusion... Pin
yeti1115-Jan-07 18:39
yeti1115-Jan-07 18:39 
GeneralRe: casting stl::vector confusion... Pin
Stephen Hewitt15-Jan-07 18:43
Stephen Hewitt15-Jan-07 18:43 
GeneralRe: casting stl::vector confusion... Pin
yeti1115-Jan-07 18:44
yeti1115-Jan-07 18:44 
AnswerRe: casting stl::vector confusion... Pin
John R. Shaw15-Jan-07 4:18
John R. Shaw15-Jan-07 4:18 
GeneralRe: casting stl::vector confusion... Pin
yeti1115-Jan-07 12:09
yeti1115-Jan-07 12:09 
GeneralRe: casting stl::vector confusion... Pin
John R. Shaw19-Jan-07 16:23
John R. Shaw19-Jan-07 16:23 
QuestionA Qestion on thread Pin
sunshine jeffrey14-Jan-07 15:35
sunshine jeffrey14-Jan-07 15:35 
AnswerRe: A Qestion on thread Pin
Stephen Hewitt14-Jan-07 15:43
Stephen Hewitt14-Jan-07 15:43 
GeneralRe: A Qestion on thread [modified] Pin
sunshine jeffrey14-Jan-07 16:29
sunshine jeffrey14-Jan-07 16:29 
GeneralRe: A Qestion on thread Pin
Stephen Hewitt14-Jan-07 16:49
Stephen Hewitt14-Jan-07 16:49 
GeneralRe: A Qestion on thread Pin
sunshine jeffrey14-Jan-07 16:52
sunshine jeffrey14-Jan-07 16:52 
GeneralRe: A Qestion on thread Pin
Stephen Hewitt14-Jan-07 16:56
Stephen Hewitt14-Jan-07 16:56 
AnswerRe: A Qestion on thread Pin
Roger Stoltz14-Jan-07 20:30
Roger Stoltz14-Jan-07 20:30 
AnswerRe: A Qestion on thread Pin
Cristian Amarie14-Jan-07 23:35
Cristian Amarie14-Jan-07 23:35 
AnswerRe: A Qestion on thread Pin
David Crow15-Jan-07 3:44
David Crow15-Jan-07 3:44 
QuestionI don't know How to build Pin
rockfanskid14-Jan-07 15:34
rockfanskid14-Jan-07 15:34 

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.