摘要:
C++里有const成员函数,那是否有const非成员函数呢?试试看:void func(int i) const{ return;}尝试编译下:[tortoise@sea temp]$ g++ -o test test.cctest.cc:6:18: error: non-member function ‘void func(int)’ cannot have cv-qualifier void func(int i) const ^[tortoise@sea temp]$ 非成员函数不能有cv限定符! 阅读全文
posted @ 2014-04-12 14:17
百里飞猫
阅读(321)
评论(0)
推荐(0)
浙公网安备 33010602011771号