Click here to Skip to main content
15,885,985 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Boost Library Pin
002comp10-Aug-10 18:02
002comp10-Aug-10 18:02 
GeneralRe: Boost Library Pin
Niklas L10-Aug-10 22:13
Niklas L10-Aug-10 22:13 
Questionany idea for "auto-cast"ing? Pin
includeh1010-Aug-10 0:24
includeh1010-Aug-10 0:24 
AnswerRe: any idea for "auto-cast"ing? Pin
Sauro Viti10-Aug-10 0:44
professionalSauro Viti10-Aug-10 0:44 
AnswerRe: any idea for "auto-cast"ing? Pin
CPallini10-Aug-10 0:45
mveCPallini10-Aug-10 0:45 
AnswerRe: any idea for "auto-cast"ing? PinPopular
Aescleal10-Aug-10 1:29
Aescleal10-Aug-10 1:29 
GeneralRe: any idea for "auto-cast"ing? Pin
Chris Losinger10-Aug-10 5:29
professionalChris Losinger10-Aug-10 5:29 
GeneralRe: any idea for "auto-cast"ing? Pin
Aescleal10-Aug-10 5:59
Aescleal10-Aug-10 5:59 
If they do then that shows that your design is a bit bent and that perhaps A and B aren't related types at all and shouldn't be stored in the same collection. It's heading towards storing void pointers.

However if you have to do this (because you're using someone else's classes) that you can't modify then abstracting the operation and the original classes into independent hierarchies is the most general way to go. If you do that then you can still keep the clients from needing to know the exact classes and operations they're using. The only types that need to know the concrete types are the operation types but you end up paying the same sort of efficiency penalty you pay using dynamic_cast to do your dispatch.

Cheers,

Ash
GeneralRe: any idea for "auto-cast"ing? Pin
Chris Losinger10-Aug-10 6:09
professionalChris Losinger10-Aug-10 6:09 
GeneralRe: any idea for "auto-cast"ing? Pin
Aescleal10-Aug-10 10:11
Aescleal10-Aug-10 10:11 
GeneralRe: any idea for "auto-cast"ing? Pin
Chris Losinger10-Aug-10 10:33
professionalChris Losinger10-Aug-10 10:33 
GeneralRe: any idea for "auto-cast"ing? Pin
Aescleal10-Aug-10 19:53
Aescleal10-Aug-10 19:53 
GeneralRe: any idea for "auto-cast"ing? Pin
Moak10-Aug-10 23:33
Moak10-Aug-10 23:33 
GeneralRe: any idea for "auto-cast"ing? Pin
Chris Losinger11-Aug-10 1:08
professionalChris Losinger11-Aug-10 1:08 
QuestionLINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Chesnokov Yuriy9-Aug-10 22:43
professionalChesnokov Yuriy9-Aug-10 22:43 
AnswerRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Richard MacCutchan10-Aug-10 0:01
mveRichard MacCutchan10-Aug-10 0:01 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Chesnokov Yuriy10-Aug-10 0:17
professionalChesnokov Yuriy10-Aug-10 0:17 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Richard MacCutchan10-Aug-10 0:46
mveRichard MacCutchan10-Aug-10 0:46 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Chesnokov Yuriy10-Aug-10 0:56
professionalChesnokov Yuriy10-Aug-10 0:56 
GeneralRe: LINK : fatal error LNK1104: cannot open file 'MyCplusplusWithSTL.lib' after converting VS2008 to VS2010 Pin
Richard MacCutchan10-Aug-10 1:40
mveRichard MacCutchan10-Aug-10 1:40 
Questionshell32.dll Pin
dilara semerci9-Aug-10 22:27
dilara semerci9-Aug-10 22:27 
AnswerRe: shell32.dll Pin
«_Superman_»9-Aug-10 22:37
professional«_Superman_»9-Aug-10 22:37 
AnswerRe: shell32.dll Pin
ThatsAlok9-Aug-10 22:45
ThatsAlok9-Aug-10 22:45 
AnswerRe: shell32.dll Pin
Aescleal10-Aug-10 0:15
Aescleal10-Aug-10 0:15 
GeneralRe: shell32.dll Pin
dilara semerci10-Aug-10 0:23
dilara semerci10-Aug-10 0:23 

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.