My code is working with integer's value, but when I tried to add the character value ,then I have error.
Here's my code:
1 #include <stdio.h>
2
3 struct _pointer{
4
5 int x;
6 int y;
7 char Q[200];
8
9 }address,*pointer;
10
11
12 main()
13 {
14 pointer = &address; // here we give the pointer the address.
15 pointer->x = 10; // here we give the pointer the value to variable x.
16 pointer->y = 30; // here we give the pointer the value to variable y.
17 (*pointer).Q = "BANGO!";
18 printf("The x variable is %d\nThe y variable is %d\nTheText\n",pointer-> x,pointer->y,pointer->Q);
19
20 }
21
So where is my mistake ?
Thanks