D
dd
Dears,
Can STL vector be a member in class, such as the following codes showed:
#ifndef __SB_SWLISTCTRL_H
#define __SB_SWLISTCTRL_H
class SBSWListCtrl : public wxListCtrl
{
public:
HINSTANCE hdll;
typedef vector<string> softwares;
SBSWListCtrl(wxWindow* parent, wxWindowID id);
void Connect();
void ShowSW();
};
#endif
When I compile the program, compiler gave me the following error
header/sbswlistctrl.h:8: `string' was not declared in this scope
header/sbswlistctrl.h:8: ISO C++ forbids declaration of `vector' with no type
header/sbswlistctrl.h:8: template-id `vector<<expression error> >' used as a
declarator
header/sbswlistctrl.h:8: parse error before `;' token
What is my problem?
Simon
27/Apr/2005
Can STL vector be a member in class, such as the following codes showed:
#ifndef __SB_SWLISTCTRL_H
#define __SB_SWLISTCTRL_H
class SBSWListCtrl : public wxListCtrl
{
public:
HINSTANCE hdll;
typedef vector<string> softwares;
SBSWListCtrl(wxWindow* parent, wxWindowID id);
void Connect();
void ShowSW();
};
#endif
When I compile the program, compiler gave me the following error
header/sbswlistctrl.h:8: `string' was not declared in this scope
header/sbswlistctrl.h:8: ISO C++ forbids declaration of `vector' with no type
header/sbswlistctrl.h:8: template-id `vector<<expression error> >' used as a
declarator
header/sbswlistctrl.h:8: parse error before `;' token
What is my problem?
Simon
27/Apr/2005