how to read from file into array 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
}
}