G
GSA
I have a struct, say,
typedef struct {
int sa ;
char sb[10] ;
} struct1;
struct1 *s1;
s1->sa = 10;
s1->sb = "aChar";
But printf below gives me an error.
printf("sa = %d\n addr of sa = %d\n sb = %s\naddr of sb = %d\n", s1-
How do I fix this? Also,I donot want to use the '++' operator on
pointer struct1.
typedef struct {
int sa ;
char sb[10] ;
} struct1;
struct1 *s1;
s1->sa = 10;
s1->sb = "aChar";
But printf below gives me an error.
printf("sa = %d\n addr of sa = %d\n sb = %s\naddr of sb = %d\n", s1-
sa, &(s1->sa), s1->sb, &(s1->sb));
How do I fix this? Also,I donot want to use the '++' operator on
pointer struct1.