I am dealing with a tab delineated text file. I use getline to get each line then parse it according to the tabs and place into an array for later manipulation. Once in a while, due to the data fed into the text file, I have either an empty line or more often a line that has nothing but ascii tabs. And while I can and do go back to manually fix the files, 

I've taken on the task to try to have my program handle the data. Using substr.empty() I can handle empty lines and successfully ignore the lines, which is what I want to do. A tab in a line makes the line not empty, which I get, and causes my substr.empty to through an error. Using substr.begin I can handle having tabs, but not to ignore the lines with tabs. Instead I just through an error and print an error to the output file to let met know I have an error. 

I can't seem to get both functions to coexist. I'm sure there is something fundamental I am missing. I have been trying to figure this out myself for over a month to no avail (I don't program every day). So I'm looking for why I can't just throw the .begin as an or boolean with the if statement empty function. and why I can't get the .begin to ignore the lines.

Here's my code:

```
ofstream file_;
ifstream file2_("forecasttest.txt");
if (file2_.is_open())
while (file2_.good()) {
    string substr;  
    getline(file2_, substr);
    string::iterator substr2 = substr.begin(); 
    //if (*substr2 == '\t') {
        //  file_.open("chaz_file.txt");  
        //  if (file_.is_open())   
        //  file_ << "you have bad data - a line that starts with a tab" << endl;
        //  file_.close();
        //  return 0;
    //}
    Input_Rows++;
    if (substr.empty()) { //|| (*substr2 == '\t')
        Input_Rows--;
    }
    else {
        istringstream iss(substr);
        cout << substr << endl;
        string token;
        while (getline(iss, token, '\t')){   
            vec_Forecast_Data_.push_back(token);
        }
    }
}

```