Hi all!
I am an new bie!
I have an error, could you should why it wrong and how to fix it!
My sample code:
When run program, an error "DAMAGE: after normal block(#42)"Code:
typedef struct _pointer_note{
char name[10];
char *loai;
int data;
float *stack_next;
}pointer;
int main()
{
pointer p1; //declare a pointer type variable
p1.loai = (char*)malloc(sizeof(char)*256);//
strcpy(p1.loai,"hello world");
// Do some thing
free(p1.loai);//free a pointer
return 0;
}
Help me!
Thanks!