C++ Programming Error/Warning Analysis (2) extra qualification

鍾超發表於2012-06-19

C++ Programming Error/Warning Analysis (2) extra qualification

  • Author:柳大·Poechant(鍾超)
  • Email:zhongchao.ustc#gmail.com (# -> @)
  • Blog:Blog.CSDN.net/Poechant
  • Date:May 9th, 2012

Explanation

例項:

… 
class Hello {
    …
    void Hello::hello();
    …
};
…

提示(g++):

Hello.h:17: error: extra qualification 'Hello::' on member 'hello'

這通常是拷貝程式碼引起的,應改為:

… 
class Hello {
    …
    void hello();
    …
};
…

Reference

  1. http://hi.baidu.com/zjugator/blog/item/77bb6cec02bee22163d09f7d.html

-

柳大·Poechant:Blog.CSDN.net/Poechant

-

相關文章