Glad you got the answer :D
I would suggest you use the following whenever you use a file for data. It may help with an immediate solution that would otherwise be directly hidden from you.
ifstream fin;
fin.open ("1.txt");
if(fin.fail() ){
cout << "Input file failed to open.\n";
exit(1);
}
You will be notified if the file is truly there, or not. Should help resolve any potential problems from reading in values to an array from a nonexistent file, or a file not found.