c++ - why this code can't open the file for read data -
i have problem in code. why can not code open file? thanks
ofstream out("a.text"); while (i != 6) { out << b[i] << ' ' ; i++ ; } out.close(); = 0 ; ( ; < 6 ; i++) { b[i] = 0 ; } ifstream in("a.txt"); // problem in line if(!in) { cout << "error" ; cin.get(); exit(0); }
export code : error
you doing output file named a.text
, try open a.txt
Comments
Post a Comment