+ 1
write a c++ code which reads the contents of a text "first_file. text"
in c++
2 Respostas
+ 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;
}



