Когда я пытаюсь скомпилировать следующий код ...
struct MemPages
{
size_t size;
volatile sig_atomic_t acc;
};
typedef std::map<unsigned long, MemPages> PagesMap;
PagesMap pagesMap;
............
pagesMap.insert(pair<unsigned long, MemPages>((unsigned long)addr, memPages ));
............
// This is Line 531
MemPages& mp = pagesMap[addr]; // Error here
Я получаю следующую ошибку ...
**replication.cpp:531: error: invalid conversion from ‘void*’ to ‘long unsigned int’
replication.cpp:531: error: initializing argument 1 of ‘_Tp& std::map<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with _Key = long unsigned int, _Tp = MemPages, _Compare = std::less<long unsigned int>, _Alloc = std::allocator<std::pair<const long unsigned int, MemPages> >]’
make: *** [all] Error 1**
Есть идеи, что происходит?