Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

error: illegal token at line xxxx

Posted on 1998-12-29
2
Medium Priority
?
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
boonstra earned 200 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

Introduction: Ownerdraw of the grid button.  A singleton class implentation and usage. Continuing from the fifth article about sudoku.   Open the project in visual studio. Go to the class view – CGridButton should be visible as a class.  R…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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 course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Suggested Courses

688 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