Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

c++ read integers from file

int main() {
	
    ifstream file("o.txt");
  	
    int num;
    while (file >> num){
      //whatever you need to do
    }
  	
}
 
PREVIOUS NEXT
Tagged: #read #integers #file
ADD COMMENT
Topic
Name
5+8 =