I'm starting to learn C++, and I wrote this program as a test:
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
char *cString;
ifstream File("file.txt");
File >> cString;
cout << cString << endl;
system("PAUSE");
return 0;
}
And when I try to run it it gives me an error and says the program needs to close... Anyone know whats wrong?
(ps. File.txt has "Hello World!" in it)