今天遇到一个错,一头雾水,又没提示程序哪里出错,报错如下:
/usr/include/c++/4.1.0/i586-suse-linux/bits/c++config.h:43: error: expected unqualified-id before 'namespace'
/usr/include/c++/4.1.0/i586-suse-linux/bits/c++config.h:47: error: '__gnu_debug_def' is not a namespace-name/usr/include/c++/4.1.0/i586-suse-linux/bits/c++config.h:47: error: expected namespace-name before ';' token
看了很久,才发现原来是一个类在声明的时候没加分号,如下:
class TokenAuthenticate
{
public:
static bool CheckToken(char *user, char * token, int show);
static bool TicketAuthenticate(char * token);
}
在最好的括号后面加上分号就ok
mark