|
-
January 2nd, 2016, 05:06 PM
#15
Re: c++ Structures export data for specific name, country, last name
Well I do it like this:
Code:
char choose[1];
do {
cout << "New check? Y/N \n";
cin >> choose;
if (_stricmp("N", choose) == 0)
{
break;
}
char name_for_check[10];
cout << "\n Name for check:";
cin >> name_for_check;
for (i = 0; i < n; i++)
{
if (strcmp(array[i].first_name, name_for_check) == 0)
{
cout << array[i].first_name << " ";
cout << array[i].last_name << " ";
cout << array[i].country << endl;
}
}
}
while (_stricmp("Y", choose) == 0);
system("pause");
}
The code is working but after I run it it show this message:
Run-Time Check Failure #2 - Stack around the variable 'choose' was corrupted.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|