i also did this sry forgot to add this in the previous post
newPage = malloc(sizeof(Page)))
Type: Posts; User: egoveneror2
i also did this sry forgot to add this in the previous post
newPage = malloc(sizeof(Page)))
lets say that i have a struct
typedef struct record{
unsigned char *name;
unsigned int race;
unsigned int classs;
unsigned int level;
unsigned char *guild;
cool my mistake again i malloced a ptr instead of a record size.... >_<
thanx again salem
ok...
haha.... i'm quite bad in C as you can see...
hmmm... i'll try to look for my mess then...
another question same codes....
typedef struct record{
char *name;
unsigned int race;
unsigned int classs;
unsigned int level;
char *guild;
wow... thanx salem... fixed it...
it was the memory allocation i did badly >_<
k = 1 would be the token that has an empty guild
however it doesnt seg fault with the code currently like that
when i do a strcpy it seg faults at k = 1 cause of the NULL the strtok returns to...
o the "test" part is hard coded atm... cause of testing purposes
hmmm ok given i've changed those as you said
blank = malloc (sizeof(char)*30);
strcpy(blank," ");
chartemp = strtok(lines,"\n");
hi, i'm new to this forums howevery i hope someone can help me out here...
i'm writing a program for an assignment actually, however i'm unable to debug this segmentation fault...
excuse the...