If you want to read from a file a string and to use it (to compare it with a constant string), the form of a line must be constant. And the lines in that file must be (for example): print "hello"
it mustn't has another form, like: print"hello" or print "hello".
The thing is that you can't read just a part of a line from a file, you have to read all the line and to store it in a char-vector so that you can work with it. In the program below, I read all the line then I store the first part of the line (the "print" -- the function name) in a vector. Then I transform that line from a char-vector in a string, so that I can compare it with a constant string: if(p=="print"). The name of that function (print) must be wrote in that file in a single way: print or PRINT. Or if you want that this name to be pRInt or PRInt, you can use the toupper macro in a loop and to compare then with "PRINT". Toupper is a macro that converts all the characters in upper caracters: pRint converts in PRINT. G-luck!