I use a structure like this:
define struct _Fragment{
int a;
char *seq;
}Fragment;
I want to initialize the structure, and using the malloc () method returns dynamic memory like this
Fragment *frag=malloc(10*sizeof(Fragment));
Then I would use a fragment pointer like this:
frag->seq="01001";
Then the problem arises when I return a lot of fragments. the error message states that (using the valgrind tool):
Uninitialised value was created by a heap allocation
who can tell me how I can handle this. thanks!
source
share