Just to say thank you. This problem is solved.
Thank you for your help, it was very appreciated.
trycstruct
User Profile
Collapse
-
Thank for replying banfa.
I had made a mistake while copying & pasting.
The struct in the program is the following:
The predeclaration looks like this:Code:struct tags { char tg[TG_NAM]; char id[ID_LEN]; char class[ID_LEN]; char col[COL_NAM]; int op; int cl; int siz; }*alltgs;
...Code:struct tags *get_id_tags(char *tbuf,
Leave a comment:
-
trycstruct started a topic Passing a dynamic array of struct to a function, the returning the same arrayin CPassing a dynamic array of struct to a function, the returning the same array
In the 'calling()' function I declare the following pointer:
I then call the 'called()' function like such:Code:struct tags { char aname[100]; int aval; . . . }*tgs;
The 'called()' function looks like this:Code:tgs = struct tags get_id_tags(buf, tgs);
...Code:struct tags *get_id_tags(char *bu, struct tags *tg) { /* statements here*/
No activity results to display
Show More
Leave a comment: