I am trying to build a Log File in c++... Can anyone tell how multiple variables such as a string,integer be written onto the file... the write to the file part of code is written in a different function present in a different file (ex. log_file.h) linked to the main file..
example:
for(int i=0;i<3;i++)
{....}
I want to write each iteration value of i to the log file...
I can do this by passing "value of i"-->in a string and "i"--> as an integer... but this will not work for all functions..
I do not get your problem. For a log-file, you could use something similar like this:
Please specify your problem.