1 2 3 4 5 6 7 8 9 10 | #include <stdio.h> int main() { void *p; int* ptr,i=5; p=&i; ptr=p; return 0; } |
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpCnsKCXZvaWQgKnA7CglpbnQqIHB0cixpPTU7CglwPSZpOwoJcHRyPXA7CglyZXR1cm4gMDsKfQ==
prog.cpp: In function ‘int main()’: prog.cpp:8: error: invalid conversion from ‘void*’ to ‘int*’
-
result: Compilation error (maybe you wish to see an example for C++ 4.7.2)


