我是 C++ 的初学者,我有一个问题。如何在下面的行中组合变量和字符串。
QMessageBox::Question(this,"Report", "the Report is in Path: " + pdfPath + "saved, do you want to open it", QMessageBox::Yes | QMessageBox::No);
pdfPath
是保存我的 pdf 文件路径的变量。
我试过这个,(“报告在路径中:” + pdfPath +“已保存,你想打开它吗”)但它不起作用。先感谢您 :)