I have a code that is reading lines from a .txt file. In this case ABC.txt.
(This is a CLR Console Application)
The lines in the file is:
Now I have a question in mind here. The code is working great but I wonder for the line:
Instead of writing this line here. Is it possible to #include a Headerfile from where this line is red instead. To refer to for ex a statement in the included file ?
If it is possible, will this be a slower process then writing it in the code directly.
using namespace std;
int main ()
int Time = 0;
double Grad = 0;
ifstream myfile ("ABC.txt");
while (getline(myfile, Date, ','))
myfile >> Time;
myfile >> Comma;
myfile >> Grad;
myfile.get(); // read in trailing newline character
if (Time > 1652)
Main << Time <<"\n";
} // End of While Statement