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

Popular posts from this blog

html5 - What is breaking my page when printing? -

html - Unable to style the color of bullets in a list -

c# - must be a non-abstract type with a public parameterless constructor in redis -