How do you create a txt file from c++¿?

I would like to create a txt file where I would have hosted datas from the code.

Can anybody help me?
#include <ftstream>

int main(){
std::ofstream file;
file.open("filelocation.text"); //actually allocation and creation here
file.close(); //make sure to close the file after using
return 0;
}
Topic archived. No new replies allowed.