preprocessor in c

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • DotKu

    preprocessor in c

    first here is the code
    >>>>>>>>>>>>>>> >>>>>>>>>>>>> >
    /*errors.c*/
    #include <stdio.h>
    #define MAX 1000
    /* this is the main function */
    int main(){
    prntf("hello\n" );
    //const float pi = 3.0;
    rturn 0;
    }
    >>>>>>>>>>>>>>> >>>>>>>>>>>>> >>
    when i do preprocess with "cl /E error.c" with VS complier
    i got message such as:

    """"""""""""""" """"""""""" """"
    ....
    ...
    ....
    #pragma pack(pop)
    #line 704 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
    \stdio.h"

    #line 706 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
    \stdio.h"

    #line 2 "C:\\DotKu\\Vis ual Studio 2005\\Projects\ \Error\\Error\
    \Error.cpp"
    ....
    ....
    """"""""""""""" """"""""""""""" """"

    any one know what does these "# 704" means?

  • Malcolm McLean

    #2
    Re: preprocessor in c


    "DotKu" <lwjct@hotmail. comwrote in message news:
    first here is the code
    >
    >>>>>>>>>>>>>>> >>>>>>>>>>>>> >>
    /*errors.c*/
    #include <stdio.h>
    #define MAX 1000
    /* this is the main function */
    int main(){
    prntf("hello\n" );
    //const float pi = 3.0;
    rturn 0;
    }
    >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >
    >
    when i do preprocess with "cl /E error.c" with VS complier
    i got message such as:
    >
    """"""""""""""" """"""""""" """"
    ...
    ..
    ...
    #pragma pack(pop)
    #line 704 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
    \stdio.h"
    >
    #line 706 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
    \stdio.h"
    >
    #line 2 "C:\\DotKu\\Vis ual Studio 2005\\Projects\ \Error\\Error\
    \Error.cpp"
    ...
    ...
    """"""""""""""" """"""""""""""" """"
    >
    any one know what does these "# 704" means?
    >
    It claims to have found an error in stdio.h.
    Which is suspicious. I suspect that stdio.h illegally defines MAX on your
    system.

    --
    Free games and programming goodies.


    Comment

    • Ben Bacarisse

      #3
      Re: preprocessor in c

      "Malcolm McLean" <regniztar@btin ternet.comwrite s:
      "DotKu" <lwjct@hotmail. comwrote in message news:
      >first here is the code
      >>
      >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >
      >/*errors.c*/
      >#include <stdio.h>
      >#define MAX 1000
      >/* this is the main function */
      >int main(){
      >prntf("hello\n ");
      >//const float pi = 3.0;
      >rturn 0;
      >}
      >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>
      >>
      >when i do preprocess with "cl /E error.c" with VS complier
      >i got message such as:
      >>
      >"""""""""""""" """"""""""""""" "
      >...
      >..
      >...
      >#pragma pack(pop)
      >#line 704 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
      >\stdio.h"
      >>
      >#line 706 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
      >\stdio.h"
      >>
      >#line 2 "C:\\DotKu\\Vis ual Studio 2005\\Projects\ \Error\\Error\
      >\Error.cpp"
      >...
      >...
      >"""""""""""""" """"""""""""""" """""
      >>
      >any one know what does these "# 704" means?
      >>
      It claims to have found an error in stdio.h.
      Which is suspicious. I suspect that stdio.h illegally defines MAX on
      your system.
      There's not error report there that I can see. The text "Error" is
      just in the OP's file name.

      The pre-processor is simply producing line control directives.

      --
      Ben.

      Comment

      • Barry Schwarz

        #4
        Re: preprocessor in c

        On Wed, 13 Feb 2008 17:42:02 -0800 (PST), DotKu <lwjct@hotmail. com>
        wrote:
        >first here is the code
        >
        >>>>>>>>>>>>>>> >>>>>>>>>>>>> >>
        >/*errors.c*/
        You tell us here that the file extension is c.
        >#include <stdio.h>
        >#define MAX 1000
        >/* this is the main function */
        >int main(){
        > prntf("hello\n" );
        > //const float pi = 3.0;
        > rturn 0;
        >}
        >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >
        >
        >when i do preprocess with "cl /E error.c" with VS complier
        >i got message such as:
        >
        >"""""""""""""" """"""""""""""" "
        >...
        >..
        >...
        >#pragma pack(pop)
        >#line 704 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
        >\stdio.h"
        >
        >#line 706 "C:\\Progra m Files\\Microsof t Visual Studio 8\\VC\\INCLUDE\
        >\stdio.h"
        >
        >#line 2 "C:\\DotKu\\Vis ual Studio 2005\\Projects\ \Error\\Error\
        >\Error.cpp"
        Your compiler is telling us it is cpp. Odds are the compiler is the
        more accurate of the two which means this is being processed as C++
        code and not C code.
        >...
        >...
        >"""""""""""""" """"""""""""""" """""
        >
        >any one know what does these "# 704" means?

        Remove del for email

        --
        Posted via a free Usenet account from http://www.teranews.com

        Comment

        Working...