KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
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 How can I error check to make sure the input file read was successful? I'm seeing much more complicated ways of reading from an ASCII file out there. Is the way I'm doing it "safe/robust"?
Tags (comma-separated)
Save Edits
Cancel