I'm having trouble accessing and printing a Boolean in the following:
This works fine for printing the name member but how do I do the same for the Boolean member?Code:#include <stdio.h> #include <stdbool.h> typedef struct { char *name; bool *pboolean; } mystruct; int main (int argc, char *argv[]) { mystruct data; mystruct *ptr_mystruct; ptr_mystruct = &data; ptr_mystruct->name = "me"; printf("The name is: %s\n", ptr_mystruct->name); return 0; }



1Likes
LinkBack URL
About LinkBacks



