海戦ゲームを作成したい。私は2つのクラスを持っています:船とセル。 C++宣言されていない識別子
#pragma once
#include"stdafx.h"
#include"Globals.h"
#include<vector>
#include"MCell.h"
class Ship
{
private:
int lenght;
int oriantation;
vector<Cell*> cells;
vector<Cell*> aroundCells;
...
#pragma once
#include<vector>
#include"MShip.h"
class Cell
{
private:
bool haveShip;
bool selected;
bool around;
int x;
int y;
Ship* ship;
は、私はそれらのような多くのエラーを持っている:
1>projects\seewar\seewar\mship.h(13): error C2065: 'Cell' : undeclared identifier
1>projects\seewar\seewar\mship.h(13): error C2059: syntax error : '>'
1>projects\seewar\seewar\mship.h(14): error C2065: 'Cell' : undeclared identifier
は、コードで何が悪いのでしょうか?
私はあなたの悲しみを行いました。しかし、私は新しいエラーが発生しました:matrix [i] [j] = new Cell(i、j); 1> c:\ users \ ostap \ documents \ visual studio 2010 \ projects \ seewar \ seewar \ mplane.h(32)エラーC2514: 'Cell':クラスにコンストラクタがありません –
Ok ..it works..thanks非常に –