我正在尝试更改某个文本框消息.它会显示我的输出.
这是我在main()中的内容
#include "form2.h"
....
string recvMSG = "random";
Run Code Online (Sandbox Code Playgroud)
182 :: Form2 :: changeOutput(recvMSG); ...
在我的form2.h中,我有:
#include <string.h>
#include <iostream>
#include <stdlib.h>
...
void Form2::changeOutput(string s)
{
QString s1 = i18n(s);
output_box.setText(s1);
}
Run Code Online (Sandbox Code Playgroud)
但我仍然得到:.ui/form2.h:56:错误:'string'尚未声明
谢谢.
编辑:: kk所以现在它显示:: TCPClient.cpp:182:错误:无法调用成员函数'virtual void Form2 :: changeOutput(std :: string)'没有对象