Program crashing over an else if statement

My program goes along the lines of
if(answer=='F')//finds article in already loaded database
//do code
else if(answer=='L')//lists articles in order
//do code
else if(answer=='A')//adds an article
//do code
...
This program uses a sorted Linked list to sort articles, and if I comment out the add an article option then it works perfectly. However, if I add it then it crashes even just in the find article function(which was working perfectly).
Here is the find and add function, if it will help.
Find:
if(answer== 'F')
{
bool found;
cout<<"Enter key: ";
cin>>key;
//Article search;
search.setKey(key);

Article art = articles.GetItem(search,found);

if(found==true)
{
cout<<"--------------------------"<<endl;
cout<<"-Record FOUND"<<endl;
cout<<"--------------------------"<<endl;
cout<<"-"<<endl;
cout<<"-Key:"<<art.getKey()<<endl;
cout<<"-Author:"<<art.getAuthor()<<endl;
cout<<"-Title:"<<art.getTitle()<<endl;
cout<<"-"<<endl;
cout<<"--------------------------"<<endl;
cout<< endl;
}
else
{
cout<<endl;
cout<<"Key not found. "<<endl;
cout<<endl;
}
}
Add:
else if(answer== 'A')
{

bool found=false;

cin.ignore();
cout<<"Enter key: ";
getline(cin, key);

search.setKey(key);
articles.GetItem(search,found);

if(found==true)
{
cout<<endl;
cout<<"This key already exists!"<<endl;
cout<<endl;

}
else
{

cout<<"Enter author: ";
getline(cin,author);

cout<<"Enter title: ";
getline(cin,title);

search.setAuthor(author);
search.setTitle(title);
articles.PutItem(search);


cout<<"-----------------------------"<<endl;
cout<<"- The following record has been added: "<<endl;
cout<<"-"<<endl;
cout<<"- Key: "<<search.getKey()<<endl;
cout<<"- Author: "<<search.getAuthor()<<endl;
cout<<"- Title: "<<search.getTitle()<<endl;
cout<<"-"<<endl;
cout<<"-----------------------------"<<endl;
}
}
Topic archived. No new replies allowed.