如何使用STL Map与Struct?

时间:2016-10-17 07:26:01

标签: c++ dictionary struct stl

我想在结构

中使用STL Map

我想在CreateToolhelp32Snapshot中找到进程名称,PPID,PID,路径,并将这些内容保存在此结构ProcessMap中。

并在0.5秒后,再次搜索那些Process事物并比较struct for update。 请帮助我..

例如

typedef struct ProcessMap
{
    boolean Survival;
    CString FileName;
    int PPID;
    int PID;
    CString Path;
};

这样使用是对的吗? (关键是PID)

map<ProcessMap, int>Pmap;

map<ProcessMap, int>::iterator it;

感谢您阅读本文。

0 个答案:

没有答案
相关问题