我正在用 gsoap 编写一个 Web 服务。当我编译这段代码时,它给了我错误:
语法错误:预期声明
当我删除向量时,它编译成功,
#include <stdsoap2.h>
#include <vector>
//gsoap ns service name: PersonData
//gsoap ns service style: document
//gsoap ns service encoding: literal
//gsoap ns service namespace: http://localhost/PersonData.wsdl
//gsoap ns service location: http://localhost:7777
//gsoap ns schema namespace: urn:PersonData
class PersonInfo
{
public:
std::string ID;
std::string FirstName;
std::string LastName;
std::string Sex;
std::string BirthDate;
std::string BirthPlace;
std::string SocialNumber;
};
class MultiplePersons
{
public:
// It gives error only with vector
std::vector<PersonInfo> info; // **here is the error**
};
int ns__getSingleValue(std::string Param, std::string *result);
int ns__getFullRecord(std::string Param, MultiplePersons *result);