Reading from a file

  • Thread starter Thread starter MyCatAlex
  • Start date Start date
M

MyCatAlex

Guest
Hi there, I have this C++ project and I need to read lines from a text file that has a .dat extension. A small sample from this file is

1 0 0.21
1 1 8.17
2 0 0.63
2 1 3.39
2 2 15.83
3 0 0.36
..............................

So, I started

ofstream myfile;

which worked well in Linux C++. Here in MS C++ VS2019 I got "myfile" underlined in red and got a message:

Incomplete types are not allowed.

What is a complete type and what is an incomplete type? How can I correct the situation?

Thanks, - MyCatAlex

Continue reading...
 
Back
Top