当前位置: 技术问答>linux和unix
string编译通不过
来源: 互联网 发布时间:2016-12-03
本文导语: HCRecordset.cpp:27: error: aggregate `std::string sT' has incomplete type and cannot be defined HCRecordset.cpp:31: error: no matching function for call to `std::vector::push_back()' /usr/local/gcc-3.4.0/lib/gcc/i386-redhat-linux/3.4.0/../../../../include/c++/3.4.0/...
HCRecordset.cpp:27: error: aggregate `std::string sT' has incomplete type and cannot be defined
HCRecordset.cpp:31: error: no matching function for call to `std::vector::push_back()'
/usr/local/gcc-3.4.0/lib/gcc/i386-redhat-linux/3.4.0/../../../../include/c++/3.4.0/bits/stl_vector.h:557: note: candidates are: void std::vector::push_back(const _Tp&) [with _Tp = std::string, _Alloc = std::allocator]
HCRecordset.cpp:32: warning: unused variable 'i'
HCRecordset.cpp: In member function `char* HCRecordset::GetData(unsigned int, unsigned int)':
HCRecordset.cpp:44: error: invalid use of undefined type `struct std::basic_string'
HCRecordset.cpp:31: error: no matching function for call to `std::vector::push_back()'
/usr/local/gcc-3.4.0/lib/gcc/i386-redhat-linux/3.4.0/../../../../include/c++/3.4.0/bits/stl_vector.h:557: note: candidates are: void std::vector::push_back(const _Tp&) [with _Tp = std::string, _Alloc = std::allocator]
HCRecordset.cpp:32: warning: unused variable 'i'
HCRecordset.cpp: In member function `char* HCRecordset::GetData(unsigned int, unsigned int)':
HCRecordset.cpp:44: error: invalid use of undefined type `struct std::basic_string'
|
g++ 编译的?
|
有没有包含头文件:
#include
using namespace std;
#include
using namespace std;
|
有没有包含头文件:
#include
using namespace std;
也许吧
#include
using namespace std;
也许吧
|
#include
using namespace std;
using namespace std;