<preprocessor command must start as first nonwhite space >
-
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!
-
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!
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
-
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!
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"
-
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"
#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! -
#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!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++
-
#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! -
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!
What line is the preprocessor complaining about?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown