leo@atcmp.nl (Leo Willems) (11/26/90)
In C++ it is not allowed to assign to a void* without a cast, in ANSI C however one may do so. int *pi; void *pv; C++: pi = (int*) pv; I always imagined why a cast was needed, the context made it clear an int* conversion was expected. I never could find an example for this difference untill I ran into this: C++: wait((int*)0); //SV wait((union wait*)0); //BSD ANSI C: wait((void*)0); //SV + BSD In my vision, the ANSI C example need not be portable. Is this a good example of the reason between the C++/ANSI C diff.? If it is not, can someone give me a good example? Thanks.