- Apr 21, 2001
- 1,197
- 0
- 0
I just want to input text inot a text file, but I always get errors. Can you tell me whats wrong with the code?
#include <iostream.h>
#include <fstream.h>
const char* file = "C:\\textfile.TXT";
ofstream fileopen(file);
int main()
{
fileopen.open();
fileopen <<"hi" << endl;
fileopen.close();
return 0;
}
#include <iostream.h>
#include <fstream.h>
const char* file = "C:\\textfile.TXT";
ofstream fileopen(file);
int main()
{
fileopen.open();
fileopen <<"hi" << endl;
fileopen.close();
return 0;
}
