943,741 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 679
  • C++ RSS
Oct 14th, 2008
0

Can someone tell me what this error means?

Expand Post »
I am trying to compile my program and I am getting alot of these errors:
C++ Syntax (Toggle Plain Text)
  1. Parser.cpp:9: error: stray ‘\200’ in program
  2. Parser.cpp:9: error: stray ‘\231’ in program
  3. 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
C++ Syntax (Toggle Plain Text)
  1. const char Parser::opTable[] = {
  2. ’\0’, ’$’, ’(’, ’)’, ’^’, ’*’, ’/’, ’+’, ’-’, ’~’ };
I cant even figure out what that error even means.

Thanks in advance for any help.
Similar Threads
Reputation Points: 39
Solved Threads: 1
Junior Poster in Training
chunalt787 is offline Offline
84 posts
since Apr 2008
Oct 14th, 2008
0

Re: Can someone tell me what this error means?

You're using the wrong quotes

C++ Syntax (Toggle Plain Text)
  1. const char opTable[] = {
  2. '\0', '$', '(', ')', '^', '*', '/', '+', '-', '~' };
Reputation Points: 161
Solved Threads: 43
Posting Whiz
stilllearning is offline Offline
309 posts
since Oct 2007
Oct 14th, 2008
0

Re: Can someone tell me what this error means?

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 ')'
Reputation Points: 39
Solved Threads: 1
Junior Poster in Training
chunalt787 is offline Offline
84 posts
since Apr 2008
Oct 14th, 2008
0

Re: Can someone tell me what this error means?

You're using the wrong quotes

C++ Syntax (Toggle Plain Text)
  1. const char opTable[] = {
  2. '\0', '$', '(', ')', '^', '*', '/', '+', '-', '~' };
What do you mean wrong quotes? Like the single quotes should be double? Wouldn't that meant that the objects were strings?
Reputation Points: 39
Solved Threads: 1
Junior Poster in Training
chunalt787 is offline Offline
84 posts
since Apr 2008
Oct 14th, 2008
0

Re: Can someone tell me what this error means?

You have back-quotes ie ’\0’ which is different from using single quotes '/0'
Reputation Points: 161
Solved Threads: 43
Posting Whiz
stilllearning is offline Offline
309 posts
since Oct 2007
Oct 14th, 2008
0

Re: Can someone tell me what this error means?

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.
Reputation Points: 39
Solved Threads: 1
Junior Poster in Training
chunalt787 is offline Offline
84 posts
since Apr 2008
Oct 14th, 2008
0

Re: Can someone tell me what this error means?

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.
Reputation Points: 39
Solved Threads: 1
Junior Poster in Training
chunalt787 is offline Offline
84 posts
since Apr 2008
Oct 14th, 2008
1

Re: Can someone tell me what this error means?

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 ?
Last edited by stilllearning; Oct 14th, 2008 at 10:27 pm.
Reputation Points: 161
Solved Threads: 43
Posting Whiz
stilllearning is offline Offline
309 posts
since Oct 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Can someone run my code template
Next Thread in C++ Forum Timeline: Help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC