Click here to Skip to main content
15,922,155 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralVector Function erase() Pin
miketra3-Jul-07 10:55
miketra3-Jul-07 10:55 
GeneralRe: Vector Function erase() Pin
Stephen Hewitt3-Jul-07 13:59
Stephen Hewitt3-Jul-07 13:59 
QuestionHow to prevent CMainFrame from restores???? Pin
SandipG 3-Jul-07 9:22
SandipG 3-Jul-07 9:22 
AnswerRe: How to prevent CMainFrame from restores???? Pin
MANISH RASTOGI3-Jul-07 18:46
MANISH RASTOGI3-Jul-07 18:46 
Questionruntime type casting Pin
wallbrick3-Jul-07 6:00
wallbrick3-Jul-07 6:00 
AnswerRe: runtime type casting Pin
Matthew Faithfull3-Jul-07 6:18
Matthew Faithfull3-Jul-07 6:18 
AnswerRe: runtime type casting Pin
led mike3-Jul-07 6:22
led mike3-Jul-07 6:22 
AnswerRe: runtime type casting Pin
Nuxser3-Jul-07 15:59
Nuxser3-Jul-07 15:59 
Must admit that I am not sure if I understood your problem. But according to I interpreted,

when you talk about converting types, you imply the concept of "casting" (Casting one data type to be another). With respect to your given pseudocode, I guess you want the type pointed by "out" to be treated as type "in" so that the assignment can work nicely. Thus you want to cast the type pointed by "out" to be as type pointed by "in".

If that understanding is true ...

You need to delve in to understanding how "type casting" works in C++. A nice tutorial -

http://www.cplusplus.com/doc/tutorial/typecasting.html

I like it as they quickly goes into how type casting with classes/structs and pointer to those needs to be carefull than for basic types.


Also for completeness, even in the case of template, it will eventually boils down to type casting as soon as the type is provided for the templates. So if you have defined two template types being them as type independent, during the runtime they are associated with provided types, hence the game boils down to type conversion between those two types.

So understanding the "type casting" will enlighten you about how to do it and if done will it be meaning full.

And for the conclusion, you will see that even though it is not a runtime error some casting will not be meaningfull or result in an wanted manner. There is no such freedom as converting ANY type to ANY type. Its not meaningfully possible (such as converting a student info class to a integer number).

Hope it can help.

Regards
AnswerRe: runtime type casting Pin
Nuxser3-Jul-07 16:17
Nuxser3-Jul-07 16:17 
Questionget Distinguished Email id from GAL Pin
Ganesh_T3-Jul-07 5:47
Ganesh_T3-Jul-07 5:47 
QuestionThread syncronization Win32 Pin
Alex Cutovoi3-Jul-07 5:26
Alex Cutovoi3-Jul-07 5:26 
AnswerRe: Thread syncronization Win32 Pin
Matthew Faithfull3-Jul-07 6:08
Matthew Faithfull3-Jul-07 6:08 
AnswerRe: Thread syncronization Win32 Pin
led mike3-Jul-07 6:19
led mike3-Jul-07 6:19 
GeneralRe: Thread syncronization Win32 Pin
Alex Cutovoi3-Jul-07 6:46
Alex Cutovoi3-Jul-07 6:46 
GeneralRe: Thread syncronization Win32 Pin
led mike3-Jul-07 8:26
led mike3-Jul-07 8:26 
GeneralRe: Thread syncronization Win32 Pin
Alex Cutovoi5-Jul-07 6:53
Alex Cutovoi5-Jul-07 6:53 
GeneralRe: Thread syncronization Win32 Pin
led mike5-Jul-07 7:17
led mike5-Jul-07 7:17 
GeneralRe: Thread syncronization Win32 Pin
Alex Cutovoi5-Jul-07 11:29
Alex Cutovoi5-Jul-07 11:29 
QuestionGraphic control on CFormView Pin
kcselvaraj3-Jul-07 5:05
kcselvaraj3-Jul-07 5:05 
AnswerRe: Graphic control on CFormView Pin
Mark Salsbery3-Jul-07 8:10
Mark Salsbery3-Jul-07 8:10 
GeneralRe: Graphic control on CFormView [modified] Pin
kcselvaraj3-Jul-07 10:14
kcselvaraj3-Jul-07 10:14 
Questionerrors on linking for *.def file Options Pin
A7Zulu3-Jul-07 4:30
A7Zulu3-Jul-07 4:30 
AnswerRe: errors on linking for *.def file Options Pin
Iain Clarke, Warrior Programmer3-Jul-07 5:53
Iain Clarke, Warrior Programmer3-Jul-07 5:53 
QuestionGeneric USB access Pin
legit3-Jul-07 4:08
legit3-Jul-07 4:08 
AnswerRe: Generic USB access Pin
CPallini3-Jul-07 4:17
mveCPallini3-Jul-07 4:17 

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.