the file, i know, is in the same directory as where the cpp file is saved.. why woudlnt the file be opening?Code:#include <iostream.h> #include <stdlib.h> #include <fstream.h> using namespace std; int main() { int array[20], i; ifstream instream; instream.open("test.dat"); for (i=0; i<10 ; i++) { instream >> array[i]; } for (i=0; i < 10; i++) { cout << array[i] << endl; } system("PAUSE"); return 0; }