reading from file
I would like to read this line in a file "0 3 4 5 6 3", I would like to set each integer to int numbers[6]; how would I go about doing this?
Open an input file:
1 2 3
|
#include <iostream>
std::ifstream ifs("my-file-name.txt");
|
Read in a single integer like this:
Last edited on
Topic archived. No new replies allowed.