I am Having trouble generating a unique id for each of my objects.
My objects are a song object witch has variables artist, genre etc.
so in my song.h file under private I have
private:
int m_ID;
static unsigned int IDSeed;
in my song.cpp file I have
Song::Song()
{
static unsigned int IDSeed = 0;
m_ID = IDSeed++;
}
Song::Song(constructor variables)
{
m_ID = IDSeed++;
}
The main error I am getting now is "unresolved external symbol private static unsigned int Song::IDSeed"