well, a few days after "dynamiclly adding struct members" im back with a half way working linked list. when i go to declare the second structure, it crashes when changing the current pointer to the new structure (line 7 here). just so you know, the W's are there cause its a structure type Weapon
heres the code:
currentW = headW;
while(currentW->next != NULL);
{
currentW = currentW->next;
}
newW = (WEAPON)malloc(sizeof(WEAPON));
currentW->next = newW;
newW->next = NULL;
if you need more, ask me and ill post it, but there are two files associated with this, and their sum of lines is 164. because of that, i uploaded a zipped VC6 workspace to
with humility, i ask that someone who can help would do so. i do realize that im just a pain in the neck for some of you, but this is my first big project and i would like to see it go through. žÅNžÅ
heres the code:
currentW = headW;
while(currentW->next != NULL);
{
currentW = currentW->next;
}
newW = (WEAPON)malloc(sizeof(WEAPON));
currentW->next = newW;
newW->next = NULL;
if you need more, ask me and ill post it, but there are two files associated with this, and their sum of lines is 164. because of that, i uploaded a zipped VC6 workspace to
with humility, i ask that someone who can help would do so. i do realize that im just a pain in the neck for some of you, but this is my first big project and i would like to see it go through. žÅNžÅ