I wrote a codes which can store user multiple input into dat file by running it again and again and then read it from fstream file while it is available by using vector (thinking to read a line one by one and stores in vector), but it just won't work? Where did I get wrong? I'm not quite sure about the concept of the combination of ofstream and ifstream actually ...and when should i close the file if i want to read the line and then write input to next line?
main.cpp(26) : error C2275: 'std::ios' : illegal use of this type as an expression
main.cpp(26) : error C2143: syntax error : missing ')' before ':'
main.cpp(26) : error C2059: syntax error : ')'
There is something very wrong with line 26. I wonder what's a : doing there. scope operator is ::