【发布时间】:2013-05-07 05:53:14
【问题描述】:
我有这个结构数组
struct BookInfo
{
char title[50];
int numAuthors;
char authors[50][50];
int year;
int checkedout;
};
struct BookInfo library[500];
我正试图弄清楚如何实现搜索,用户可以输入一个单词,该函数将打印该书的全名 例如在 char 标题中,两本书是
a rose for emily
war of the worlds
如果用户输入 worlds,该函数将打印
war of the worlds
我看到了使用 int 而不是使用 char 数据类型的线性搜索,这是如何处理的
【问题讨论】: