Class name does not name a type in C++

前端 未结 10 1962
情深已故
情深已故 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:21

    when you define the class A, in A.h, you explicitely say that the class has a member B.

    You MUST include "B.h" in "A.h"

提交回复
热议问题