I am new to C++ and want to add error checking to my code plus I want to make sure I'm using good coding practices. I read a line from an ASCII file into a string using:

ifstream paramFile;
string tmp;

//open input file

tmp.clear();

paramFile >> tmp;

//parse tmp
  1. How can I error check to make sure the input file read was successful?

  2. I'm seeing much more complicated ways of reading from an ASCII file out there. Is the way I'm doing it "safe/robust"?

Edit
Report