Lol, sorry for being so vague earlier. Well here's a larger section of my code, I've deleted some bits that aren't important like long lines of "cout << ...".
Right now, the program does not compile and I am unsure of why. Suggestions?
Code:
void updateroutine ( int numitems)
{
int i,j;
char tempstr[80];
cout <<("\nEnter stock number of item to be updated ... ");
cin >> tempstr;
j = atoi(tempstr);
cout <<"\nSearching for item number " << j;
for(i=0;i < numitems; i++)
if(j == slist[i].stocknumber)
{
cout <<"\nItem is: " ;
cout.width (6);
cout << slist[i].stocknumber ;
cout.width (25);
cout << slist[i].description ;
cout.width (25);
cout << slist[i].supplier ;
cout.width (4);
cout << slist[i].quantity ;
cout.width (10);
cout << slist[i].price ;
}}
//UPDATE DETAILS OF ITEMS ON THE LIST
void update( int numitems)
// declare local variables
int i,j;
char tempstr[80];
char updatechoice[80];
do{
system ("cls");
cout << "\n ======SEARCH MENU======\n";
cout << ("\nUPDATE AN ITEM IN STOCK");
listitems (numitems);
cout << " 1. Update stock number\n";
cin >> updatechoice;
if (!strcmp(updatechoice, "1"))
{
updateroutine(numitems)
cout <<("\n\t\t Enter the stock number of the new item ");
cin >> tempstr;
slist[i].stocknumber = atoi(tempstr);
};//End if
}