0
Pointers still confuse me mostly in situations like this. The idea is simple. I’m trying to create a pointer vector like struct
. But I must be using some misconception of pointers because the program is not displaying what I ask.
I wanted to know what could be wrong. If I remedy this doubt will help me a lot. A big thank you to whoever wants and can help me.
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
struct agenda_x
{
char nome[50];
char tel[10];
int a;
};
struct agenda_x *contato[2];
int main()
{
contato[0]->a=4;
printf("%i",contato[0]->a);
}
If they confuse you, what do you think of the idea of doing something simpler until you get the hang of it and then move on to something more sophisticated?
– Maniero
It’s because it’s work so there’s no way kskskskkssk but I think I understand what happened
– Clown HS.