Hej, mam problem taki, że przed pokazaniem komunikatu wpisz zdanie: oczekuje na jego wpisanie. Jak zrobić, żeby najpierw był komunikat?
#include <QtCore/QCoreApplication>
#include <Qstring>
#include <QTextStream>
#include <time.h>
QTextStream cout(stdout);
QTextStream cin(stdin);
int main()
{
bool a = true;
QString s1("To "), s2("jest "), s3("string.");
s1 += s2;
QString s4 = s1 + s3;
cout << s4 << endl;
cout << " Jego rozmiar to: " << s4.length();
while (a == true) {
cout << endl << "wpisz zdanie: ";
//cout << endl << " ";
s2 = cin.readLine();
cout << endl << "Twoje zdanie: \n" << ">>>" << s2 << endl;
cout << "Jego rozmiar to: " << s2.length() << endl;
a = s2.length();
_sleep(6220);
system("cls");
}
cout << endl << "goodbye" << endl;
_sleep(600);
return 0;
}