Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <conio.h>
- using namespace std;
- struct WordCard
- {
- char word[100];
- char trans;
- };
- class Dictionary
- {
- public:
- char name[];
- WordCard card[100];
- friend istream &operator>>(istream &stream, Dictionary &ob);
- Dictionary(char);
- void greate();
- void show();
- void search();
- Dictionary operator+(Dictionary ob);
- Dictionary operator-(Dictionary ob);
- Dictionary operator/(Dictionary ob);
- };
- Dictionary::Dictionary(char n[])
- {
- strcpy(this->name,n);
- }
- istream &operator>>(istream &stream, Dictionary &ob)
- {
- cout << "Enter the name of your new dictionary:"<<endl;
- stream >> ob.name;
- }
- void Dictionary::greate()
- {
- cout<<"Enter name of your new dictionary"<<endl;
- cin>>name;
- }
- void Dictionary::show()
- {
- cout<<"Your Dictionaries:"<<endl;
- cout<<name<<":"<<endl;
- }
- void Dictionary::search()
- {
- }
- int main()
- {
- char ch;
- Dictionary d("First");
- Dictionary a("Second");
- Dictionary b("Third");
- for(;;)
- {
- cout<<"Menu:n";
- cout<<"1.Greate new dictionaryn";
- cout<<"2.Show dictionariesn";
- cout<<"3.Exitn";
- cout<<"Your choise: ";
- cin>>ch;
- switch(ch)
- {
- case '1':a.greate();break;
- case '2':a.show(); break;
- case '3':exit(0);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement