Click here to Skip to main content
15,914,767 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: monitoring user connections in my PC Pin
m-a-s-a-k-i-t-o-n3-Jul-07 22:16
m-a-s-a-k-i-t-o-n3-Jul-07 22:16 
QuestionCustom Vector Allocator Pin
miketra3-Jul-07 10:04
miketra3-Jul-07 10:04 
AnswerRe: Custom Vector Allocator Pin
Maximilien3-Jul-07 10:31
Maximilien3-Jul-07 10:31 
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 
I'm new to c++ and this forum, so please...

I want to convert one type(int/float/double, can be 8/16/32/64bits), which is unknow when compiling, to another type, which is also unknow at compile time, in some function. One way is to use a vitual function and override that function with different arugment types. It's a heavy function with a lot of coding, so I want to search some other options.
I'm wondering if there is a solution so that I only need to write one conversion function which can take care of whatever input/output types.

Here are some pseudo codes which I'm not sure if they can be somehow realized. Hope it wouldn't confuse you.

define type T*;

Convert( T* in, T* out)
{
for_each_datum_in
{ *in=(type of out)*out;
}
}

//call the function here
Convert( TypeOfIn * in, TypeOfOut * out);

now here am i

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 
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 

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.