Hello all there!
I have no experience with STL but now i must use it.
I wanna do this:
I have a class "Token" in the "tokenClass .h" and
1)I wanna be eble initialise my *m_Board in a default constructor.
2)and I want also to be eble to initialise my m_Board Dynamicaly
... anyone there to help me I will be very greatifull
I have no experience with STL but now i must use it.
I wanna do this:
I have a class "Token" in the "tokenClass .h" and
1)I wanna be eble initialise my *m_Board in a default constructor.
2)and I want also to be eble to initialise my m_Board Dynamicaly
... anyone there to help me I will be very greatifull
Code:
#include "tokenClass.h"
#include <vector>
using namespace std;
class GameB
{
private:
vector<vector<Token> >* m_Board;
int xloc;
int yloc;
public:
GameB()
{
m_Board = new vector<vector<Token> >(6,vector<Token>(6,0));
}
GameB(int locatx,int locaty)
:xloc(locatx),yloc(locaty)
{
m_Board=new vector<vector<Token> >(xloc,vector<Token>(yloc));
}
};
Comment