当前位置: 技术问答>linux和unix
C++ 中能包含 #include<curses.h>吗?
来源: 互联网 发布时间:2016-05-11
本文导语: C++ 中能包含 #include吗? 还在序编译时,检测到 /opt/aCC/include/tree 下有许多重载的erase函数,而在 #include 下也有 erase 的定义,就报了下面的错误!如果不包含#include 头文件是可以编译得过的,但我现在要用的...
C++ 中能包含 #include吗?
还在序编译时,检测到 /opt/aCC/include/tree 下有许多重载的erase函数,而在
#include 下也有 erase 的定义,就报了下面的错误!如果不包含#include 头文件是可以编译得过的,但我现在要用的就是#include 包下的函数! 该怎么办呢?
下面是报的错误!
Warning 134: "/opt/aCC/include/tree", line 759 # Expected 0 arguments for macro 'erase'.
erase(begin(), end());
^^^^^
Warning 134: "/opt/aCC/include/tree", line 866 # Expected 0 arguments for macro 'erase'.
iterator erase (iterator position);
^^^^^
Error 20: "/opt/aCC/include/tree", line 866 # ' ' expected before '('.
iterator erase (iterator position);
^^^^^
Error 24: "/opt/aCC/include/tree", line 866 # ' ' expected instead of '0'.
iterator erase (iterator position);
^^^^^
Error 24: "/opt/aCC/include/tree", line 866 # ' ' expected instead of '0'.
iterator erase (iterator position);
^^^^^
Error 21: "/opt/aCC/include/tree", line 866 # ')' expected before ')' to close scope.
iterator erase (iterator position);
^^^^^
Error 419: "/opt/aCC/include/tree", line 866 # 'stdscr' is used as a type, but has not been defined as a type.
iterator erase (iterator position);
^^^^^
Warning 134: "/opt/aCC/include/tree", line 867 # Expected 0 arguments for macro 'erase'.
size_type erase (const key_type& x);
^^^^^
Error 19: "/opt/aCC/include/tree", line 866 # Unexpected ')'.
iterator erase (iterator position);
^^^^^
Error 20: "/opt/aCC/include/tree", line 867 # ' ' expected before '('.
size_type erase (const key_type& x);
^^^^^
Error 24: "/opt/aCC/include/tree", line 867 # ' ' expected instead of '0'.
size_type erase (const key_type& x);
^^^^^
Error 24: "/opt/aCC/include/tree", line 867 # ' ' expected instead of '0'.
size_type erase (const key_type& x);
^^^^^
Error 21: "/opt/aCC/include/tree", line 867 # ')' expected before ')' to close scope.
size_type erase (const key_type& x);
^^^^^
Error 285: "/opt/aCC/include/tree", line 867 # Functions that differ only in return type may not have the same name;
"#5::size_type rb_tree::wmove(int,int,int)" was previously declared to return "class iterator" at ["/opt/aCC/include/tree",
line 866].
size_type erase (const key_type& x);
^^^^^
Error 419: "/opt/aCC/include/tree", line 867 # 'stdscr' is used as a type, but has not been defined as a type.
size_type erase (const key_type& x);
^^^^^
Error 699: "/opt/aCC/include/tree", line 867 # Error limit reached; halting compilation.
size_type erase (const key_type& x);
下面是我在Unix 下 打 man erase 查出的信息: 高手帮忙看一下呀:谢谢
clear(3X) clear(3X)
CURSES
NAME
clear, erase, wclear, werase - clear a window
SYNOPSIS
#include
int clear(void);
int erase(void);
int wclear(WINDOW *win);
int werase(WINDOW *win);
DESCRIPTION
The clear(), erase(), wclear() and werase() functions clear every
position in the current or specified window.
还在序编译时,检测到 /opt/aCC/include/tree 下有许多重载的erase函数,而在
#include 下也有 erase 的定义,就报了下面的错误!如果不包含#include 头文件是可以编译得过的,但我现在要用的就是#include 包下的函数! 该怎么办呢?
下面是报的错误!
Warning 134: "/opt/aCC/include/tree", line 759 # Expected 0 arguments for macro 'erase'.
erase(begin(), end());
^^^^^
Warning 134: "/opt/aCC/include/tree", line 866 # Expected 0 arguments for macro 'erase'.
iterator erase (iterator position);
^^^^^
Error 20: "/opt/aCC/include/tree", line 866 # ' ' expected before '('.
iterator erase (iterator position);
^^^^^
Error 24: "/opt/aCC/include/tree", line 866 # ' ' expected instead of '0'.
iterator erase (iterator position);
^^^^^
Error 24: "/opt/aCC/include/tree", line 866 # ' ' expected instead of '0'.
iterator erase (iterator position);
^^^^^
Error 21: "/opt/aCC/include/tree", line 866 # ')' expected before ')' to close scope.
iterator erase (iterator position);
^^^^^
Error 419: "/opt/aCC/include/tree", line 866 # 'stdscr' is used as a type, but has not been defined as a type.
iterator erase (iterator position);
^^^^^
Warning 134: "/opt/aCC/include/tree", line 867 # Expected 0 arguments for macro 'erase'.
size_type erase (const key_type& x);
^^^^^
Error 19: "/opt/aCC/include/tree", line 866 # Unexpected ')'.
iterator erase (iterator position);
^^^^^
Error 20: "/opt/aCC/include/tree", line 867 # ' ' expected before '('.
size_type erase (const key_type& x);
^^^^^
Error 24: "/opt/aCC/include/tree", line 867 # ' ' expected instead of '0'.
size_type erase (const key_type& x);
^^^^^
Error 24: "/opt/aCC/include/tree", line 867 # ' ' expected instead of '0'.
size_type erase (const key_type& x);
^^^^^
Error 21: "/opt/aCC/include/tree", line 867 # ')' expected before ')' to close scope.
size_type erase (const key_type& x);
^^^^^
Error 285: "/opt/aCC/include/tree", line 867 # Functions that differ only in return type may not have the same name;
"#5::size_type rb_tree::wmove(int,int,int)" was previously declared to return "class iterator" at ["/opt/aCC/include/tree",
line 866].
size_type erase (const key_type& x);
^^^^^
Error 419: "/opt/aCC/include/tree", line 867 # 'stdscr' is used as a type, but has not been defined as a type.
size_type erase (const key_type& x);
^^^^^
Error 699: "/opt/aCC/include/tree", line 867 # Error limit reached; halting compilation.
size_type erase (const key_type& x);
下面是我在Unix 下 打 man erase 查出的信息: 高手帮忙看一下呀:谢谢
clear(3X) clear(3X)
CURSES
NAME
clear, erase, wclear, werase - clear a window
SYNOPSIS
#include
int clear(void);
int erase(void);
int wclear(WINDOW *win);
int werase(WINDOW *win);
DESCRIPTION
The clear(), erase(), wclear() and werase() functions clear every
position in the current or specified window.
|
有不同的命名空间吗?调用前加std试试.