I was wondering if i could have a map of list .
I was trying like this ..but i think i can't do like this. Any suggestion to do things like that or any alternative solution with help of c++.

#include <iostream>
#include <list>
#include <map>
using namespace std;
struct CommandOp
    uint8_t api_id;
    uint8_t commandId;
    uint8_t catagory;
    uint8_t transId;
    uint8_t prevTransId;
    uint8_t status;
    int thandle; /*Transaction id to communicate to confd */
    void *command_elem;
 /*   ~CommandOp()
int main()
    list <CommandOp>  m_AddCommandList;
    map <int, m_AddCommandList> m_DynamicListMap;
    return 0;

You can only put types in the angle brackets. You're trying to use a variable. Try this: map <int, list<CommandOp> > m_DynamicListMap;