urgency:broken my work at here

liujg liu.jianguo@prosperity.com.cn
Tue Apr 10 02:54:00 GMT 2001




Sir:
I encounter a problem when i try to complier code included 
following lines:
 
#define MakeXMLException(theType, expKeyword) \ class 
expKeyword theType : public XMLException \ { \ public: 
\  \     theType(const   char* 
const         srcFile 
\             , const 
unsigned int        srcLine 
\             , const 
XMLExcepts::Codes toThrow) : \         
XMLException(srcFile, srcLine) \     { 
\         loadExceptText(toThrow); 
\     } \  \     theType(const 
theType& toCopy) : 
\  \         XMLException(toCopy) 
\     { \     } \   
\     theType(const   char* 
const         srcFile 
\             , const 
unsigned int        srcLine 
\             , const 
XMLExcepts::Codes toThrow 
\             , const 
XMLCh* const        text1 
\             , const 
XMLCh* const        text2 = 0 
\             , const 
XMLCh* const        text3 = 0 
\             , const 
XMLCh* const        text4 = 0) : 
\         XMLException(srcFile, srcLine) 
\     { \         
loadExceptText(toThrow, text1, text2, text3, text4); \     } 
\  \     theType(const   char* 
const         srcFile 
\             , const 
unsigned int        srcLine 
\             , const 
XMLExcepts::Codes toThrow 
\             , const 
char* const         text1 
\             , const 
char* const         text2 = 0 
\             , const 
char* const         text3 = 0 
\             , const 
char* const         text4 = 0) : 
\         XMLException(srcFile, srcLine) 
\     { \         
loadExceptText(toThrow, text1, text2, text3, text4); \     } 
\  \     virtual ~theType() {} 
\  \     theType& operator=(const theType& 
toAssign) \     { 
\         
XMLException::operator=(toAssign); 
\         return *this; 
\     } \  \     virtual 
XMLException* duplicate() const \     { 
\         return new theType(*this); 
\     } \  \     virtual const 
XMLCh* getType() const \     { 
\         return 
XMLUni::fg##theType##_Name; \     } \  \ private : 
\     theType(); \ };
 
The complier error messages by GCC show:
/home/daluser/xerces-c1_4_0-SolCC/include/util/XMLException.hpp:202: 
syntax erro r before 
`:' /home/daluser/xerces-c1_4_0-SolCC/include/util/XMLException.hpp:202: 
stray '\' i n program
Why? How can resolve it?
 
Best!
LiuJG
 



More information about the Gcc-help mailing list