I'm pretty new to C++ and even looking to related Q/A on SO I didn't find a proper answer to my issue.
I'm really struggling trying to instantiate a new map of pointers map<p1*, p2*>
.
So far, I tried:
std::map<myType*, myType*> mapOfVertices = new std::map<myType, myType>;
Or:
std::map<myType*, myType*> mapOfVertices = new std::map<myType*, myType*>;
But I'm always getting:
error: conversion from ‘std::map*’ to non-scalar type ‘std::map’ requested std::map mapOfVertices = new std::map;
I'm very confused since I already managed to initialize successfully other objects like:
myType* myObj = new myType;
I'm sorry if my question is a bit trivial. Thanks in advance.