I was wondering how to put a variable where the bold text is text is:
ofstream file;
file.open ("example.txt");
I was wondering how to put a variable where the bold text is text is:
ofstream file;
file.open ("example.txt");
just put a variable there :-P
if you use std::string then you need to get the const char* using .c_str() so your options are:
const char *file = "example.txt"
file.open(file);
or:
std::string file = "example.txt"
file.open(file.c_str());
source code is plain text, there is no such thing as a "bold" variable.