Topic title says it all. I would like to turn this mess:
char string; sprintf(string, "Error: %s at %08X with parameter %i and size %.2f", szA, pB, iC, fD); pretty_fatal_error_thrower(string);
into this beauty:
pretty_fatal_error_thrower("Error: %s at %08X with parameter %i and size %.2f", szA, pB, iC, fD);
Can it be done without basically re-writing printf() from scratch? That's pretty much all I get with a Google search. I would switch to C++ streams except for the minuscule yet important detail that streaming does not support custom formatting such as "%08X". Thanks in advance.