Skipping whitespaces when reading file In reading a file, I found blank lines (even at the bottom) crash the program. To fix this, I've added the following if statement:

string line;
while(getline(inFile, line))
{
    if(line.length() &lt; 1 || (line.length() == 1 &amp;&amp; isspace(line.at(0))))//this was added
        continue;
    string result = process(line);
    aStruct.field1 = result;
    //...rest of code
}


For what it's worth, it can be assumed there isn't going to be a bizarre mix of white space making an entire line. For example, one line isn't going to be six spaces (maybe one space, by mistake). This solution isn't exactly elegant.
The at() method validates that the input is in the correct range. Since you have already done the validation there is no point in using this method you may as well use operator[]

Additionally there is a call to check for empty strings empty() so prfer to use that rather than test the length against zero.

if (line.empty() || (line.length() == 1 &amp;&amp; isspace(line[0])))