#include <iostream>
#include <fstream>
#include <cstdlib>
using std::cout;
using std::endl;
using std::ifstream;
int main()
{
constint SIZE = 50;
ifstream fin;
fin.open("Map.txt");
if(!fin.is_open())
{
exit(EXIT_FAILURE);
}
char word[SIZE];
fin >> word;
int num;
while(fin.good())
{
cout << word << " " <<endl;
fin >> word;
}
fin.close();
system("Pause");
return 0;
}
What could be the problem. I think its because I am using a char array to read the input. But that wouldn't make sense considering char to int is similar. Need a second opinion thanks.