It is not often that one would need to do this, so use it with caution. But the following should work. Instead of
var2 = (Class2*)var1;
just insert an additional cast to pointer to void
var2 = (Class2*)((void*)var1);
Most compilers accept this.
Mark
Absolutely!
I don't know if Microsoft has included it (I don't do windows if I can avoid it), but most C and C++ compilers (such as g++) support pthreads. They are not obvious how to use, however. I'd suggest the PThreads book by O'Reilley. I was able to get it via interlibrary loan from my...