I have this program...
No errors, no warnings!Code:#include <iostream> #include <fstream> using namespace std; int main (void) { float temps_degc[2][6]; int i = 0; int j = 0; // Initialise multid array for(i = 0; i < 3; i++) for(j = 0; j < 7; j++) temps_degc[i][j] = 0.0; ifstream filestream; // Create a file called "filestream" which I will be able to access through my program filestream.open("temps.dat"); //\\mwsug05\\u05\\EE0U61A9\\Documents\\Visual Studio 2008\\Projects\\temps.dat if(!filestream) cout << "Cannot open file!" << endl; for(i = 0; i < 3; i++) for(j = 0; j < 7; j++) { filestream >> temps_degc[i][j]; cout << temps_degc[i][j] << endl; } filestream.close(); return 0; }
But when I run it I get a run time error right before the program finishes. It displays all the value from the file to the screen and then an error appears.
Can anyone help???
thanks