J
JS
I can't seem to access the field in this struct:
#include <stdio.h>
struct data{
int x;
int y;
};
static struct data test;
struct data *pp = &test;
pp->x = 23;
in the last line I get "parse error before "->" token.
How do I set x to 23?
#include <stdio.h>
struct data{
int x;
int y;
};
static struct data test;
struct data *pp = &test;
pp->x = 23;
in the last line I get "parse error before "->" token.
How do I set x to 23?