1 Reply Latest reply on Mar 7, 2008 3:54 PM by 3004

    Syntax error in server code

    666705
      Hi,

      This is a part of my server code.
      =============================
      strcpy(tstfld1, EmployeeOutputList.testfld1);
      strcpy(tstfld2, EmployeeOutputList[i].testfld2);
      strcpy(tstfld3, EmployeeOutputList[i].testfld3);
      strcpy(tstfld4, EmployeeOutputList[i].testfld4);
      strcpy(tstfld5, EmployeeOutputList[i].testfld5);
      strcpy(tstfld6, EmployeeOutputList[i].testfld6);
      strcpy(tstfld7, EmployeeOutputList[i].testfld7);
      ================================================

      I get this error while compiling:

      server.c(222) : error C2059: syntax error : '('
      server.c(223) : error C2059: syntax error : '('
      server.c(224) : error C2059: syntax error : '('
      server.c(225) : error C2059: syntax error : '('
      server.c(226) : error C2059: syntax error : '('
      server.c(227) : error C2059: syntax error : '('
      server.c(228) : error C2059: syntax error : '('
      ===========================================

      What could be the reason? Please help.

      Thyag
        • 1. Re: Syntax error in server code
          3004
          Thyag,

          It is likely that the actual error was on a line earlier than one of the
          lines you have shown, such as failing to terminate a previous function call
          or function defnition with a ) or }. Try to verify that ( ) and { }
          characters are balanced in your program.
          Also, it is sometimes helpful to compile code with "cc -P" instead of
          "cc -c" when debugging a difficult problem. This will run the preprocessor
          only and produce output in a file suffixed with .i, which you can examine to
          see if there are any problems with macro defintions or problems in included
          header files.

          If you are using "buildserver" to compile directly from .c files, you can
          run "buildserver -v" to see the command line that buildserver is passing to
          the compiler and then modify this command line to compile manually.

          Ed

          <Thyagarajan J S> wrote in message news:300015362@newsgroups.bea.com...
          Hi,

          This is a part of my server code.
          =============================
          strcpy(tstfld1, EmployeeOutputList.testfld1);
          strcpy(tstfld2, EmployeeOutputList[i].testfld2);
          strcpy(tstfld3, EmployeeOutputList[i].testfld3);
          strcpy(tstfld4, EmployeeOutputList[i].testfld4);
          strcpy(tstfld5, EmployeeOutputList[i].testfld5);
          strcpy(tstfld6, EmployeeOutputList[i].testfld6);
          strcpy(tstfld7, EmployeeOutputList[i].testfld7);
          ================================================

          I get this error while compiling:

          server.c(222) : error C2059: syntax error : '('
          server.c(223) : error C2059: syntax error : '('
          server.c(224) : error C2059: syntax error : '('
          server.c(225) : error C2059: syntax error : '('
          server.c(226) : error C2059: syntax error : '('
          server.c(227) : error C2059: syntax error : '('
          server.c(228) : error C2059: syntax error : '('
          ===========================================

          What could be the reason? Please help.

          Thyag