+ 1

write a c++ code which reads the contents of a text "first_file. text"

in c++

27th May 2018, 4:59 PM
Vijay Mahour
Vijay Mahour - avatar
1 Réponse
+ 1
#include <iostream> #include <fstream> using namespace std; int main () { string A[1000]; int i=0; ifstream inFile ("first_file.text"); while(!inFile.eof()){ string g; inFile >> g; i++; A[i]=g; } inFile.close(); return 0; }
27th May 2018, 9:06 PM
Millionaire4 4
Millionaire4 4 - avatar