I think you should try learning C++ for a while, until you understand the basics.
The problem I am having is that I am not sure if(line.find==0) is working for me or is it a right way or not. because if say it encounters the characters I am hoping for at the start of line i.e. (10 , I need to read the lines following it and store it. But I dont think getline command is working in that case.
Because at the moment, you look like someone with a problem to solve and an empty toolbox.
Try this
Code:
int lineNum = 1;
while ( getline(inmesh,line) ) {
cout lineNum << " " << line << endl;
lineNum++;
}
Does it print the WHOLE file?
If it does, then getline is working.
Now try this
Code:
int lineNum = 1;
while ( getline(inmesh,line) ) {
cout << line << endl;
if(line.find("(0 ")==0) {
cout lineNum << " " << line << endl;
}
lineNum++;
}
Is it finding all the lines?
Is it finding lines which don't interest you at this stage?
Well that's where you come in, work out a better test so it finds ONLY the lines which interest you.