Quote Originally Posted by cxl2253 View Post
classAddress =(unsigned long)this ;
Better use void * and reinterpret_cast, just in case you stumble upon an architeture where unsigned long has a different size than pointers.