File output
Dec 30, 2012 at 1:48am
1 2 3 4
|
ofstream File("test.txt");
string f;
cin >> f;
File << f;
|
shouldn't these lines of code work?
Dec 30, 2012 at 3:40am
Possibly. Are you having some sort of problem with them?
Dec 30, 2012 at 4:13am
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
#include <fstream>
#include <string>
#include <iostream>
main()
{
std::string f;
std::ofstream myfile;
myfile.open("test.txt");
std::cin >> f;
std::cin.get();
myfile << f;
std::cin.get();
}
|
Dec 30, 2012 at 4:44am
have no idea what the problem was or how it was fixed it just happens to work now thanks anyway guys
Topic archived. No new replies allowed.