Hi, I'm new to C, I've only used C++ before. I have this problem with pointers to struct. This seems really elementary but I just can't find the solution.
It compiles all right, but causes segmentation fault. Here's the code:
Code:typedef struct { int inumber; float fnumber; } the_type; int main() { the_type* N; N->inumber = 16; //this line causes segmentation fault - why? return 0; }