Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. <preprocessor command must start as first nonwhite space >

<preprocessor command must start as first nonwhite space >

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpquestion
7 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    white jungle
    wrote on last edited by
    #1

    It throw out the error mssage "preprocessor command must start as first nonwhite space" when I compile the xxx.cpp and I found that it can't find the class definition,but I do include the .h file. I don't know what is meaning of error message "preprocessor command must start as first nonwhite space". BTW: I haven't changed the settings in my project! Don't look at me in that way!

    T R D 3 Replies Last reply
    0
    • W white jungle

      It throw out the error mssage "preprocessor command must start as first nonwhite space" when I compile the xxx.cpp and I found that it can't find the class definition,but I do include the .h file. I don't know what is meaning of error message "preprocessor command must start as first nonwhite space". BTW: I haven't changed the settings in my project! Don't look at me in that way!

      T Offline
      T Offline
      ThatsAlok
      wrote on last edited by
      #2

      http://msdn.microsoft.com/library/en-us/vccore98/html/c2014.asp[^]

      "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

      cheers, Alok Gupta

      1 Reply Last reply
      0
      • W white jungle

        It throw out the error mssage "preprocessor command must start as first nonwhite space" when I compile the xxx.cpp and I found that it can't find the class definition,but I do include the .h file. I don't know what is meaning of error message "preprocessor command must start as first nonwhite space". BTW: I haven't changed the settings in my project! Don't look at me in that way!

        R Offline
        R Offline
        Ryan Binns
        wrote on last edited by
        #3

        white jungle wrote: I don't know what is meaning of error message Preprocessor commands (such as #include and #define) must be the first thing on the line. You can have spaces/tabs in front of them, but nothing else.

        Ryan

        "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

        W 1 Reply Last reply
        0
        • R Ryan Binns

          white jungle wrote: I don't know what is meaning of error message Preprocessor commands (such as #include and #define) must be the first thing on the line. You can have spaces/tabs in front of them, but nothing else.

          Ryan

          "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

          W Offline
          W Offline
          white jungle
          wrote on last edited by
          #4

          #include "StdAfx.h" #include "DbControl.h" #ifdef _DEBUG #define new DEBUG_NEW #endif CDbControl::CDbControl(void) { m_pConn=NULL; m_pRs=NULL; m_pConn=new CADOConnection(); ASSERT(m_pConn!=NULL); } CDbControl::~CDbControl(void) { if(m_pConn) { delete m_pConn; m_pConn=NULL; } } ............ Here is my code,and you can see nothing beafore the number sign'#' Don't look at me in that way!

          C T 2 Replies Last reply
          0
          • W white jungle

            #include "StdAfx.h" #include "DbControl.h" #ifdef _DEBUG #define new DEBUG_NEW #endif CDbControl::CDbControl(void) { m_pConn=NULL; m_pRs=NULL; m_pConn=new CADOConnection(); ASSERT(m_pConn!=NULL); } CDbControl::~CDbControl(void) { if(m_pConn) { delete m_pConn; m_pConn=NULL; } } ............ Here is my code,and you can see nothing beafore the number sign'#' Don't look at me in that way!

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #5

            Try deleting everything up to and including the stdafx.h include, then rewrite that include, and finally do a clean and rebuild all. Then search your entire project for #, to see if the problem is elsewhere, if need be. Christian Graus - Microsoft MVP - C++

            1 Reply Last reply
            0
            • W white jungle

              #include "StdAfx.h" #include "DbControl.h" #ifdef _DEBUG #define new DEBUG_NEW #endif CDbControl::CDbControl(void) { m_pConn=NULL; m_pRs=NULL; m_pConn=new CADOConnection(); ASSERT(m_pConn!=NULL); } CDbControl::~CDbControl(void) { if(m_pConn) { delete m_pConn; m_pConn=NULL; } } ............ Here is my code,and you can see nothing beafore the number sign'#' Don't look at me in that way!

              T Offline
              T Offline
              toxcct
              wrote on last edited by
              #6

              and how about into the files you include (stdAfx.h and DbControl.h) ?


              TOXCCT >>> GEII power
              [toxcct][VisualCalc]

              1 Reply Last reply
              0
              • W white jungle

                It throw out the error mssage "preprocessor command must start as first nonwhite space" when I compile the xxx.cpp and I found that it can't find the class definition,but I do include the .h file. I don't know what is meaning of error message "preprocessor command must start as first nonwhite space". BTW: I haven't changed the settings in my project! Don't look at me in that way!

                D Offline
                D Offline
                David Crow
                wrote on last edited by
                #7

                What line is the preprocessor complaining about?


                "Ideas are a dime a dozen. People who put them into action are priceless." - Unknown

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups