在线等候宏问题?
我在tc3下编译一段程序时(里面含有一些宏),每当include<iostream.h>时,就出现如下错误:
Compiling ..\PROGRAM\ELUOSI.CPP:
Error ..\INCLUDE\IOSTREAM.H 115: Declaration terminated incorrectly
Error ..\INCLUDE\IOSTREAM.H 116: Declaration terminated incorrectly
Error ..\INCLUDE\IOSTREAM.H 210: Identifier expected
Error ..\INCLUDE\IOSTREAM.H 210: Declaration terminated incorrectly
Error ..\INCLUDE\IOSTREAM.H 303: 'streambuf::base()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 304: 'streambuf::pbase()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 305: 'streambuf::pptr()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 306: 'streambuf::epptr()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 307: 'streambuf::gptr()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 308: 'streambuf::egptr()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 309: 'streambuf::eback()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 310: 'streambuf::ebuf()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 311: 'streambuf::unbuffered()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 312: 'streambuf::blen()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 315: 'streambuf::setbuf(unsigned char *,int)' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 317: 'streambuf::pbump(int)' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 318: 'streambuf::gbump(int)' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 319: 'streambuf::unbuffered(int)' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 321: 'streambuf::in_avail()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 323: 'streambuf::out_waiting()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 324: 'streambuf::allocate()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 327: 'streambuf::sgetc()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 331: 'streambuf::snextc()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 336: 'streambuf::sbumpc()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 341: 'streambuf::stossc()' is not a member of 'streambuf'
Error ..\INCLUDE\IOSTREAM.H 341: Too many error or warning messages
不用<iostream.h>,便可通过编译并能正确运行,我怀疑是宏的问题,我定义的宏有:
#define backcolor 4
#define fillcolor 2
#define width 24
#define leftfrontier 201
#define topfrontier 81
#define upkey 18432
#define downkey 20480
#define leftkey 19200
#define rightkey 19712
#define pausekey 6512
#define esckey 283
请各位高手指点迷津。
谢谢了!
在线等候,解决后马上结贴!