我如何修复“无人认领的断点” QT中的错误
嗨,我在下面有我的程序,但它显示以下错误,这导致它不运行,我是QT的新手:
c:\ users \ panas \ oneDrive \ desktop \ lests \ sass1question1 \ stoneprocessor \ main.cpp:66:error:Error:Expection' 。 。 66 | } while(!validateInput(input.at(0))); |
这是错误来自的代码段:
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
int answer = 0;
QStringList input;
do {
do {
input = getSentence();
if (input.at(1) == "cancel")
} while (!validateInput(input.at(0)));
QString result = generateOutput(input.at(0));
displayOutput(result);
answer = tryAgain();
} while (answer == QMessageBox::Yes);
return EXIT_SUCCESS;
}
Hi i have my program below but it's showing the following error which is causing it not to run, I'm new to Qt:
C:\Users\panas\OneDrive\Desktop\Lessons\Ass1Question1\SentenceProcessor\main.cpp:66: error: expected primary-expression before '}' token
..\SentenceProcessor\main.cpp: In function 'int qMain(int, char**)':
..\SentenceProcessor\main.cpp:66:9: error: expected primary-expression before '}' token
66 | }while(!validateInput(input.at(0)));
|
Here is the code snippet where the error is coming from:
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
int answer = 0;
QStringList input;
do {
do {
input = getSentence();
if (input.at(1) == "cancel")
} while (!validateInput(input.at(0)));
QString result = generateOutput(input.at(0));
displayOutput(result);
answer = tryAgain();
} while (answer == QMessageBox::Yes);
return EXIT_SUCCESS;
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论