code

What does this code do

fstream file.open("States.txt", fstream::in);

i dont understand the :: part or why the code has -, fstream::in-
http://www.cplusplus.com/reference/fstream/fstream/open/

fstream::in is one of the flags you can send to the open function. It means the file is for input

'::' is the scope resolution operator.
Last edited on
Topic archived. No new replies allowed.