下面的类吐出大约 20 个错误,但如果我注释掉矢量项目符号,它似乎一切都很好。我错过了一些明显的错误吗?
#include <vector>
#include "SDL.h"
#include "Bullet.h"
#ifndef GAMEDATA_H
#define GAMEDATA_H
class GameData
{
public:
GameData();
~GameData();
GameData(const GameData& data);
GameData& operator=(const GameData* rhs);
vector<Bullet> bullets;
SDL_Surface* shipimage;
SDL_Surface* bulletimage;
};
#endif