Answers for "reading numeric data from file c++"

C++
1

c++ read integers from file

int main() {
	
    ifstream file("o.txt");
  	
    int num;
    while (file >> num){
      //whatever you need to do
    }
  	
}
Posted by: Guest on October-05-2020

Browse Popular Code Answers by Language