Hi,
i have a problem that is rather basic but since i am not a frequent developper this presents a difficulty to me that i do not understand. So what i have is :
and w.h that looks like this:Code:#include <stdio.h> #include "w.h" void main(){ WheelCnt *wheel; wheel->x =0; wheel->y = 0; printf("%d\n",wheel->y); }
the error i get when i run the program is :Code:#define MAXWSIZE 200 typedef struct WheelCnt{ int q[MAXWSIZE]; int x; int y ; }WheelCnt;
Segmentation fault (core dumped)
and this is because i am trying to do this:
Can someone helpCode:wheel->x =0; wheel->y = 0;
thank you !!!



2Likes
LinkBack URL
About LinkBacks



