I am trying to print the value of an array using a pointer to that array's struct but I always get a segmenation fault.
thanks.
#include <stdio.h>
typedef struct{
int x;
int y;
}POINTS;
int main() {
POINTS *pointsmain;
pointsmain->x = 10;
printf("%d",pointsmain->x);
return 0;
}