以下の2つの機能があります。文字で表示されるようにコードを変更するにはどうすればよいですか?
たとえば、「A」を定義すると、Aで始まるAllRecordsのみが表示されます。
char* displayRecordContent (CountryRecordType ctryRec)
{
char * output;
output = ctryRec.Country;
return output;
}
// ====================================================================
void showAllRecords ()
{
int i=0;
char * result;
for (i=0; i<NoOfRecordsRead; i++)
{
result = displayRecordContent (globalCountryDataArray [i]);
printf ("(%d) %s\n", i, result);
}
}
出力:
(0) Andorra
(1) United Arab Emirates
(2) Afghanistan
(3) Antigua and Barbuda
(4) Anguilla
(5) Albania
(6) Armenia
(7) Netherlands Antilles
(8) Angola
(9) Antarctica