Solved

error: illegal token at line xxxx

Posted on 1998-12-29
2
228 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
CRON statement to run every 3 minutes except on Monday morning 12am to 2am 7 89
sameEnds challenge 3 136
NotAlone Challenge 20 80
Detect file exist or not 3 134
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.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …

864 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now