You are trying to extract an integer from a string, and then try to find the "#" in integers. This makes no sense, and the compiler complains that there is no find method for integers.
You should probably check the "#" directly on the read line at the beginning of the loop. In addition, you need to declare qlline and actually open the file somewhere, and not just pass the line with that name to getline . Mostly like this:
ifstream myfile("myfile.txt"); string qlline; while (getline(myfile, qlline)) { if (qlline.find("#") == 0) { continue; } ... }
source share