thanks a lot, but then i have another question, what if i would like to allocate memory for 2 different structs in the same function? is it impossible?
do i have to return it?
i thought that passing the structs trough pointers, i would be allocating memory for the original variable.
i just...
could anyone tell me what's wrong about the use of pointers and malloc. =)
in function alloc_memory the memory is allocated just fine, but when it returns, the pointers test and test->test are 0x00 =(((
#include <stdio.h>
#include <stdlib.h>
typedef struct
{
char *value1;
char *value2...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.