W
winbatch
Hi,
I'm trying to write a function that accepts a string of some kind
(either char * or std::string) that can be passed something in printf
semantics.
For example:
void test( string passedIn )
{
....etc..
}
test( "Whatever: %s = %d", val, 3 );
How would I write the test function to accept such a string so that it
can handle whatever is passed as a single string? (ie so that it will
get "Whatever: val = 3"
Thanks in advance.
I'm trying to write a function that accepts a string of some kind
(either char * or std::string) that can be passed something in printf
semantics.
For example:
void test( string passedIn )
{
....etc..
}
test( "Whatever: %s = %d", val, 3 );
How would I write the test function to accept such a string so that it
can handle whatever is passed as a single string? (ie so that it will
get "Whatever: val = 3"
Thanks in advance.