what is better when creating new variable in a loop in c++
- by user63898
hello
in c++ what is better programming
say i need to create new stl::map in each loop interation
what will be better as poiner instance of as static instance for example
for(int i=0;i<3;i++)
{
stl::map<int,int>* m = new stl::map<int,int>;
or ...
stl::map<int,int> m;
}