/******************************************************************************
Online C++ Compiler.
Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.
*******************************************************************************/
#include <iostream>
#include <fstream>
using std::cout; using std::ofstream;
using std::endl; using std::string;
int main()
{
string filename("arquivo.html");
string valor_edit = "ALGUMA COISA";
ofstream file_out;
file_out.open(filename, std::ios_base::app);
file_out << "<html>" << endl;
file_out << "<body>" << endl;
file_out << "<font face='arial' size=+2 color='red'>" + valor_edit +"</font>" << endl;
file_out <<"</body>" << endl;
file_out <<"</html>" << endl;
cout << "FIM !" << endl;
return EXIT_SUCCESS;
}
Some random text to append.
<html>
<body>
<font face='arial' size=+2 color='red'>ALGUMA COISA</font>
</body>
</html>