how to only read int from ifstream 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
}
}