The feature you are looking for is called variable argument lists. Here is how to use it:
void Write(LogInfo Info, LogType Type, char *Message, ...);
The implementation:
va_list args; va_start(args, Message);char szBuf[1024];vsprintf_s(szBuf, 1024, Message, args);
The szBuf is now the string to write to the file/window/whatever.
I support only the printf way, because my messages to the logfile have a time and type assigned to it. If you do it the stream way, you can't tell what the message is exactly, or you'll have to do it like:
Log("LogFile.txt") << "This is a sample log: " << IntegerToLog << LogType << EndOfMessage;
I hope you have something from this reply.
Emiel1
PS: Always remember to flush the file you are writing for after the real write. It's a real pain to look for the reason for a crash, while the message was still in OS-memory, and not yet written to the log.
PS2: Also, you write a float with %f instead of %d.