This is going to look like a very basic question to allot of you but for the life of me I can't find how to do this anywhere on the web. Allot of convoluted solutionsn out there.
I simply want to save a textfile as a .html file. Having seriouse difficulties.
In the below code, towards the bottom I want to save the file as an html file.
Any suggestions. Thanks
#include <fstream>
#include <iostream>
int main()
{
std::ofstream FileOne("c:\\testfile.txt");
if(!FileOne)
{
std::cerr<<"Cannot open the output file."<<std::endl;
return 1;
}
FileOne<<"ThisIsATest";
FileOne.close(); // How do I save FileOne "testfile.txt" as testfile.html ?
return 0;
}