static members must be both declared and defined. You have
declared it (in the struct). You must also define it, which will
allocate storage for the static variable. So, in ONE cpp file ,
you declare it as follows :
int Test::value;
This goes outside of any function. (similar to a global variable)
Main Topics
Browse All Topics





by: nam_et_ipsa_scientia_potestas_estPosted on 2003-08-26 at 18:24:53ID: 9229026
this is probably stupid but try:
int Test::value=10;