Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <Windows.h>
- #include <QDebug>
- // std::string support for qDebug()
- QDebug operator<<(QDebug out, const std::string& str) {
- out << str.c_str();
- return out;
- }
- int main() {
- SetConsoleCP(1251);
- SetConsoleOutputCP(1251);
- QTextStream s(stdin);
- qDebug() << "Введіть слово або фразу:";
- std::string str = s.readLine().toStdString();
- qDebug() << "\nstd::string:" << str;
- qDebug() << "std::list з коробки:"
- << QString::fromStdString(str)
- .split(QRegExp("\\s+"))
- .toStdList();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement