Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void * ptr;
- int m, n, p;
- float x, y;
- scanf("%d", &p);
- if(p==0) ptr = &m;
- else ptr = &x;
- // ...
- if(P==0) // assegna ad n il valore di m
- n=*((int*) ptr); //con tipo "puntatore a int" .
- else // Non รจ quindi legale scrivere n= *ptr;
- y=*((float*) ptr);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement