Solved

error: illegal token at line xxxx

Posted on 1998-12-29
2
231 Views
Last Modified: 2013-12-26
I am getting a compile error: illegal token in main.c at line 126, what does this error mean. The code looks fine but the error goes away when I block out the code the error is pointing too.
0
Comment
Question by:dwp090598
2 Comments
 
LVL 3

Accepted Solution

by:
boonstra earned 50 total points
ID: 1291686
I suspect this is code that you cut and pasted from Experts Exchange.  For some reason, it introduces characters that are illegal in C.  What your code had looked like:
         /*      if( 1 )
                    {
                          //notHandled = true;
                          //dlgP = (DialogPeek)aWindow;
                    
      
                  } */

but the hex dump was:
0000: 09 20 20 20 2F 2A 09 69 66 28 20 31 20 29 20 0D       .   /*.if( 1 ) .
0010: 09 20 20 09 09 7B 20 0D 09 20 20 09 09 09 2F 2F       .  ..{ ..  ...//
0020: 6E 6F 74 48 61 6E 64 6C 65 64 20 3D 20 74 72 75       notHandled = tru
0030: 65 3B 0D 09 20 20 09 09 09 2F 2F 64 6C 67 50 20       e;..  ...//dlgP
0040: 3D 20 28 44 69 61 6C 6F 67 50 65 65 6B 29 61 57       = (DialogPeek)aW
0050: 69 6E 64 6F 77 3B 20 0D CA CA CA CA CA CA CA CA       indow; .        
0060: 09 09 0D 09 0D 09 09 09 7D 20 2A 2F 0D                ........} */.

Note the 0xCA characters in the hex dump.

Solution is to retype the posted code rather than cut and paste.
0
 

Author Comment

by:dwp090598
ID: 1291687
Boonstra has answered my question perfectly as usual!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
xyBalance chalenge 58 96
Include multiple hostnames in this command? 3 55
difference between String.subString() and String.subSequence() 6 241
x-bar in Google Sheets 2 72
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question