The file contains the following data:
#10000000 AAA 22.145 21.676 21.588
10 TTT 22.145 21.676 21.588
1 ACC 22.145 21.676 21.588
I tried to skip lines starting with "#" using the following code:
#include <iostream>
#include <sstream>
#include <fstream>
#include <string>
using namespace std;
int main() {
while( getline("myfile.txt", qlline)) {
stringstream sq(qlline);
int tableEntry;
sq >> tableEntry;
if (tableEntry.find("#") != tableEntry.npos) {
continue;
}
int data = tableEntry;
}
}
But for some reason it gives this error:
Mycode.cc:13: error: request for member 'find' in 'tableEntry', which is of non-class type 'int'