当我尝试编写此类时,它不会将其视为类,并且无法解析类 Card。我能用它做什么?
#ifndef HAND_HPP
#define HAND_HPP
#include <iosfwd>
#include <vector>
#include "cards.hpp"
class Hand { //it doesn't mark it as class
private:
int maxSize;
std::vector<Card> hand; //Cannot resolve variable 'Card'
public:
***
};
#endif //HAND_HPP
现在我可以上传图片了,看起来是这样的。并且cards.hpp(其中声明了Card)包含hand.hpp。