65,206
社区成员
发帖
与我相关
我的任务
分享
class CTestData
{
public:
CTestData(void);
~CTestData(void);
struct CTest_DATA
{
int m_i;
CString m_str;
};
struct StudentRecord{
struct StudentInfo{
char* name;
int year;
char* addr;
};
StudentRecord(int id, char* name_, int year_, char* addr_){
m_id = id;
sf.name = name_;
sf.year = year_;
sf.addr = addr_;
}
int m_id;
StudentInfo sf;
};
public:
set<CString> m_strData;
map<int, CString*> m_DataMap;
typedef CList<CTest_DATA*, CTest_DATA*> CTestDataList;
CTestDataList m_dataList;
};
void CTest_stlDlg::OnBnClickedButtonmap()
{
// TODO: 在此添加控件通知处理程序代码
StudentRecord student1 = StudentRecord(1, "aaa", "aaaa");
pair<int, m_data::StudentRecord::StudentInfo> pairStudent1(student1.id, student1.sf);
}