第15周 项目3 oop版电子词典

#include 
#include 
#include 
#include 
#include 
using namespace std;
class Word
{
private:
    string english;
    string word_class;
    string chinese;
public:
    friend istream& operator >>(istream &input,Word &t);
    friend ostream& operator <<(ostream &output,Word &t);
    string fanhui()
    {
        return english;
    }
    void dispay()
    {
        cout<>(istream &input,Word &t)
{
    input>>t.english>>t.chinese>>t.word_class;
    return input;
}
ostream& operator <<(ostream &output,Word &t)
{
    output<>word[num];
        num++;
    }
    infile.close();
    cout<<"请输入一个你想查找的单词:"<>word1)
    {
        if(word1=="1111")
        {
            break;
        }
        else
        {
            high=num;
            low=0;
            mid=(high+low)/2;
            while(lowword1)
                {
                    high=mid-1;
                }
                mid=(high+low)/2;
            }
            if(word[mid].fanhui()!=word1)
            {
                cout<<"查无此词!"<

你可能感兴趣的:(第15周 项目3 oop版电子词典)