Thread: facing problem in cmopiling the code

  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    8

    facing problem in cmopiling the code

    Hi,

    I am trying to comppile this C code in VC++6.0, but its giving me error like.

    Compiling...
    NEWSVARS_T_SWA.CPP
    C:\NEWSVARS_T_SWA.CPP(211) : error C2065: 'c' : undeclared identifier
    C:\NEWSVARS_T_SWA.CPP(211) : error C2065: 'arg' : undeclared identifier
    C:\NEWSVARS_T_SWA.CPP(212) : error C2448: '<Unknown>' : function-style initializer appears to be a function definition
    C:\NEWSVARS_T_SWA.CPP(212) : fatal error C1004: unexpected end of file found
    Error executing cl.exe.

    NEWSVARS_T_SWA.OBJ - 4 error(s), 0 warning(s)


    can anyone help me to find out where the error is and how to debug this error:

  2. #2
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    On lines 211, 212 & 213 you are using old-style declarations for your function. Either change the function declaration to a modern-day format (not a K&R format), or maybe you can change your compiler options to allow that antique syntax.

    Todd
    Mainframe assembler programmer by trade. C coder when I can.

  3. #3
    Registered User
    Join Date
    Jan 2008
    Posts
    290
    3 kittens died because of that code.

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    8
    what needs to be put if i go for modern format...any example? n if i goto change the settings ...then what is the path to change the same.?

  5. #5
    Jack of many languages Dino's Avatar
    Join Date
    Nov 2007
    Location
    Chappell Hill, Texas
    Posts
    2,332
    Mainframe assembler programmer by trade. C coder when I can.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Code problem
    By sybariticak47 in forum C++ Programming
    Replies: 9
    Last Post: 02-28-2006, 11:50 AM
  2. Problem with game code.
    By ajdspud in forum C++ Programming
    Replies: 5
    Last Post: 02-14-2006, 06:39 PM
  3. problem with selection code
    By DavidP in forum Game Programming
    Replies: 1
    Last Post: 06-14-2004, 01:05 PM
  4. Replies: 5
    Last Post: 12-03-2003, 05:47 PM
  5. Help with code for simple Y2K problem
    By Mule in forum C++ Programming
    Replies: 3
    Last Post: 03-06-2003, 12:53 AM