3
我在我的程序中有以下#include
,我試圖從控制檯應用程序更改爲GUI應用程序。我必須手工編碼。問題是我的程序無法導入字符串標題。這是爲什麼?不能包含<string>標題
#ifndef CATALOG_H_
#define CATALOG_H_
#include <string>
#include "StudentRepository.h"
#include "Student.h"
using namespace std;
class Catalog{
private:
StudentRepository *studRepo;
public:
Catalog(StudentRepository *stre):studRepo(stre){};
~Catalog();
void addNewStudent(string name, int id, int group);
void removeStudent(string name);
void editStudent(string,int,int);
Student seachStudent(string name);
void printStudents();
.
.
.
};
#endif /* CATALOG_H_ */
錯誤:
Description Resource Path Location Type
Type 'string' could not be resolved Catalog.h /L_6-8_GUI line 25 Semantic Error
PS:我使用Eclipse與QT插件。
什麼問題?它是否包含在程序中,但沒有獲得庫函數? – ScarCode
在你的問題中沒有任何事情可以用Qt:去掉標籤。 –
那麼,否則包括工作,我很快移動到Qt項目it dosent進口... –