Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream> //библиотека с простыми манипуляторами
- #include <iomanip> //библиотека с параметризированными манипуляторами
- using namespace std; //подключение пространства имён
- const int n=10, m=80, b=20;
- int masinput(char **mas, int n)
- {
- cout<<"Введите текст"<<endl;
- int w=0;
- while (w<n)
- {
- cin.getline(mas[w],m);
- if ((strcmp(mas[w],"")==0)) break;
- w++;
- }
- if ((strcmp(mas[w],"")==0))
- return w+1;
- }
- int wordsearch(char **mas, int n, int q)
- {
- cout<<"Введите слово для поиска"<<endl;
- char word[b];
- cin>>word;
- return 0;
- }
- int main(void) //главная функция
- {
- //руссификация консоли
- setlocale(LC_ALL, "RUSSIAN");
- //переменные
- char **mas;
- mas=new char *[n];
- for (int i=0; i<n; i++)
- mas[i]=new char [m];
- int q=masinput(mas,n);
- int e=wordsearch(mas,n,q);
- cout<<e<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement