I,m this class :
class Foo {
private:
Objet grid;
static Player *players[2];
public:
Foo(int len, string ps1, string ps2);
};
When i do this :
Foo::Foo(int len, string ps1, string ps2){
grid.setLen(len);
players[0] = new Ange(ps1, grid.getLen()/2, grid.getLen/2);
players[1] = new Demon(ps2);
}
Player
is a class
abstract
and Ange
et Demon
herited to class
Player
I'm this error to xCodes when i compile
Undefined symbols for architecture x86_64: "Partie::joueurs", referenced from: Partie::Partie(int, std::__1::basic_string, std::__1::allocator >, std::__1::basic_string, std::__1::allocator >) in Partie.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
help me please !!!
Excuse my english i'm french