Good day to all. Here's a question:
cout << "Введите количество строк, которые хотите ввести -> "; cin >> m; for (int i = 0; i < m; i++) { cout << "Введите строку -> "; cin.ignore(); gets_s(str); pptr = ADDstr(pptr, sz, str); sz++; } SHOWstr(pptr, sz); The program asks for strings from the user and then displays, after the second iteration of the loop, the first character disappears from the lines, its gets_s () function loses, but I haven’t managed to overcome it yet. Do not tell me how to solve this problem?
cin.ignore()method, which drops the first character from the input stream. - Sergey Gornostaev