Hello,
I'm trying to write a debug functions for my application so I can see all the values I like to.
My goal is it looks like this:
So that I can call it like this:Code:void Debug(std::message, ...)
I've no idea how I can work with %i, or if there are better solutions.Code:Debug("Error: %i, %i", 34, 35);
This is what I've so far (not much), just a basic idea:
GreetzCode:void Debug( std::string message, ...) { va_list list; va_start(list, message); ??? va_arg(list, ?? ); va_end(list); // here message shoul contain everything and be ready for output ? cout << message << endl; }




Reply With Quote