Dev-C++ using variables in functions?

Soldato
Joined
2 May 2004
Posts
19,950
Hi,

I have this code to backup my save-game(s):

Code:
std::ifstream ifs("Craig06.usr", std::ios::binary);
std::ofstream ofs("Craig06Backup.usr", std::ios::binary);

ofs << ifs.rdbuf();

Rather than using the name Craig06Backup.usr I'd like to be able to do Craig06<current_date>.usr to avoid it overwriting the previous backup.

So, any idea how I can use variables in that bit of coding please?

Thanks,
Craig.
 
Back
Top Bottom