Pointers store memory addresses only.
struct_a *pointer;
This just declares a variable that holds some memory address. At that memory address there might be a struct_a object, or there might not be.
Then how do you know whether pointer points to an actual object or not? You have to assign a memory address to the pointer.
You can either dynamically allocate a block of memory to hold the object, and assign the address of that memory to pointer:
pointer = malloc(sizeof(struct_a));
Or you can allocate the object on the stack, and then store the memory address of that object in the pointer:
struct_a foo;
pointer = &foo;
But as it stands, in your code pointer doesn't point to anything, but you use the -> operator to access the memory that the pointer points to.
And in C you actually can do that, but you get undefined behavior. Like a segmentation fault. Or possibly just weird behavior. Anything is possible.
So, just make the pointer point to something before using it.
pointeris uninitialize.qtd_lines? It's just an integer.pointer->qtd_lines, until you makepointerpoint to some allocated memory. This is nothing to do withvector.struct_a foo; foo.qtd_lines = 10; foo.vector = malloc....