Class name does not name a type in C++

前端 未结 10 1975
情深已故
情深已故 2020-12-08 09:37

I just started programming in C++, and I\'ve tried to create 2 classes where one will contain the other.

File A.h:

#ifndef _A_h
#define          


        
10条回答
  •  臣服心动
    2020-12-08 10:08

    error 'Class' does not name a type
    

    Just in case someone does the same idiotic thing I did ... I was creating a small test program from scratch and I typed Class instead of class (with a small C). I didn't take any notice of the quotes in the error message and spent a little too long not understanding my problem.

    My search for a solution brought me here so I guess the same could happen to someone else.

提交回复
热议问题