Hi all,
I just started learning c++ and i was fooling around a little bit, trying to make something that would put my input in a file; i wrote this:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream SaveFile("text.txt", ios::ate);
SaveFile << cin;
SaveFile.close();
return 0;
}
I compiled and run i, but instead of asking for my input, it just ended and cat text.txt gave 0x8049b38. I know this has something to do with memory, but thats all. It's not terribly important, but if someone could explain - very simple!- why it does that, i can stop losing my sleep over it
.
thx,
maarten