在执行“CUser m_user;”时出现如下错误,我该如何修改
error C2146: syntax error : missing ';' before identifier 'm_user'
error C2501: 'CUser' : missing storage-class or type specifiers
error C2501: 'm_user' : missing storage-class or type specifiers
其中CUser是我定义的一个一般类。

解决方案 »

  1.   

    Compiler Error C2501
    'identifier' : missing storage-class or type specifiersThe identifier was declared without specifying its type.Tips The most typical cause of this error is a typographical error. Recheck the identifier to ensure it is spelled correctly and that the alphabetic case is correct.
    This error may occur when a type specifier is omitted in the declaration of an identifier. In the following example, assume the header file for the class CUndeclared has been omitted:
    class CMyClass {
    private:
       CUndeclared m_myClass;  // Error: Class unknown
    } ;
      

  2.   

    谢谢各位,我才学VC,入门比VB难多了。