Hey fellas:
//this is my list structure:
struct batter_node{
char batter_name[NAME_LENGTH]; //set to 20 for now
batter_node *next;
};
batter_node *first//head pointer
batter_node *current_batter;//my current node
//this is my recursive function:
void print_recurse(){
current_batter=first;
if((current_batter->next)==NULL){
cout<<current_batter->batter_name<<endl;
return;
}else{
current_batter=current_batter->next;//to move through my list
print_recurse();//to call itself again
cout<<current_batter->batter_name<<endl;//once returns print current node
}
}
This keeps on core dumping me.. i can't see what i'm doing wrong.. Thanks for your time