Δημοσιεύτηκε: 13 Ιούλ 2011, 22:03
- Κώδικας: Επιλογή όλων
printf("The size of \"struct test\" is: %d bytes\n", (char *)(p+1) - (char *)p );
Κάνεις casting σε char * αλλα η αφαίρεση βγάζει 1!
To Forum της Ελληνικής Κοινότητας Ubuntu-gr
https://forum.ubuntu-gr.org/
printf("The size of \"struct test\" is: %d bytes\n", (char *)(p+1) - (char *)p );