Solved

error: illegal token at line xxxx

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

747 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

11 Experts available now in Live!

Get 1:1 Help Now