Quote:
Originally Posted by Sane
Here it is in C. I'm not sure if C++ has different rules regarding void pointer typecasting, but hopefully it can be of use until someone else fills in the details for me.
#include <stdio.h> #include <stdlib.h> void outstring(void *p) { char *s = (char *)p; printf("%s\n", s); } int main() { outstring("Hello World!"); return 0; }
|
fixed that with a dumb fix: i was suppose to use static_cast. new error now.