I am trying to compile my program and I am getting alot of these errors:

Parser.cpp:9: error: stray ‘\200’ in program
Parser.cpp:9: error: stray ‘\231’ in program
Parser.cpp:9: error: stray ‘\342’ in program

That sequence of three lines just keeps repeating and repeating.

These are lines 8 and 9 from the file Parser.cpp

const char Parser::opTable[] = {
   ’\0’, ’$’, ’(’, ’)’, ’^’, ’*’, ’/’, ’+’, ’-’, ’~’ };

I cant even figure out what that error even means.

Thanks in advance for any help.

Recommended Answers

All 7 Replies

I also just noticed that it throws that same error for any line that uses one of the elements of the opTable array that I added such as ')'

You're using the wrong quotes

const char opTable[] = {
   '\0', '$', '(', ')', '^', '*', '/', '+', '-', '~' };

You're using the wrong quotes

const char opTable[] = {
   '\0', '$', '(', ')', '^', '*', '/', '+', '-', '~' };

What do you mean wrong quotes? Like the single quotes should be double? Wouldn't that meant that the objects were strings?

You have back-quotes ie ’\0’ which is different from using single quotes '/0'

ooo ok that must be from a copy and paste problem. I changed that but it didn't fix anything. Do you know what that error generally means maybe I can spot something wrong.

Alright well my bad I had some other wrong quotes that I fixed and it took care of the problem. Thank you stilllearning for the help.

If anyone knows the general description of that problem for the future tho please feel free to let me know.

As far as I know these errors arise from the illegal quotes you were using. If you fix all of those, then it should compile correctly. Can you paste your Parse.cpp code if its not too long ?

commented: Thanks for your patience and help +1
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.