I'm having some troubles with some strings in c++. heres my code:
I want to output a sentence but it only outputs the first word, so i need some help their.
Thanks.
Code:
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
string work;
cin >> work;
cout << work;
ofstream myfile;
myfile.open ("example.html");
myfile << "<html>\n";
myfile << "<head>\n";
myfile << "<title>";
myfile << "hello";
myfile << "</title>\n";
myfile << "</head>\n";
myfile << "<body>\n";
myfile << "<font size=45>";
myfile << work;
myfile << "</font>\n";
myfile.close();
system ("pause");
return 0;
}
I want to output a sentence but it only outputs the first word, so i need some help their.
Thanks.