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