Problem with vectors and classes
Hi guys. I'm having a problem with getting a vector to fill with my location class here is the code:
Code:
#include<iostream>
#include<vector>
using namespace std;
class location
{
public:
int x,y;
static int id;
char fill;
location(int x2, int y2, char a)
{
x = x2;
y = y2;
fill = a;
id++;
}
};
class board
{
public:
board()
{
vector<location>board(361, new location(0,0,'+'));
}
};
void makeBoard()
{
}
int main(int argc, char **argv)
{
makeBoard();
return 0;
}
Could someone tell me how to fix this? I know the program doesn't really do anything but I get some compiling errors.
axel