how to read integer from text file in c++ code example
Example: c++ read integers from file
int main() {
ifstream file("o.txt");
int num;
while (file >> num){
//whatever you need to do
}
}
int main() {
ifstream file("o.txt");
int num;
while (file >> num){
//whatever you need to do
}
}