Posted on 2001-06-27
I would like to build a "universal" messagebox that will accept any type (and number) of args. This routine will convert the args (if necessary), concatinate them and then show them via the messagebox... I would like to use STL but I really don't have deep experiece with C++ and could use some help...
//loop thru each argument:
for( int i = 0; i < nArgs; ++i )
//get an arg:
//convert it to a string type:
convArg = ---
//concatenate the arg to the cumulative string:
Note: I would like the args to be of any type, including pointers (in which case you would be printing an adress).
the caller would just use UMsgbox like this:
UMsgbox(V1," Hi Mom! ",T2,s," pointer: ",pData);
Please help me by suppling or substituting the necessary code.
Thanks in advance!