Complete the program below to satisfy the requirements that
follow:
#include <QApplication>
#include <QInputDialog>
#include <QMessageBox>
#include <QString>
int main(int argc, char *argv[]){
QApplication app(argc,argv);
// write lines of code to
include here
return 0;
}
Write down the additional lines of code in
the main() function so that it - reads a full name using
a QInputDialog in a comma separated format
(Example: Tshepo,Motsatsi).
- checks and processes the user input. If the
user input is empty or the number of words in the name is less than
2, then display an error message using a QMessageBox. If the
user input is correct, then display the full name (input) in a
space separated format (Example: Tshepo Motsatsi) in
a QMessageBox. Assume that a name may contain any number of
words.
You need not write the entire program. Write down only the
additional lines of code.
Complete the program below to satisfy the requirements that follow: #include #include #inc
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am