input files

Given this input:

5
4
1 2 45
1 3 4
2 3 16
2 4 6
3 4 8

How do I read in the 5 and store it in an int variable?
1
2
int myInt;
filestream >> myInt;
Topic archived. No new replies allowed.