game.cpp
#include <iostream>
#include <string>
#include <sstream>
#include "game.h"
#include "board.h"
#include "piece.h"
using namespace std;
游戏
#ifndef GAME_H
#define GAME_H
#include <string>
class Game
{
private:
string white;
string black;
string title;
public:
Game(istream&, ostream&);
void display(colour, short);
};
#endif
错误是:
game.h:8 error: 'string' does not name a type
game.h:9 error: 'string' does not name a type
using namespace std;
进入标头是一种卑鄙的行为。建议加倍,所以!