lundi 28 juin 2021

How do I make the map CONTAINER be allocated on the heap?

Basically I have this map container :

map <int, double> r_t_plus_1;

I know that r_t_plus_1 is on the stack, and its elements go into dynamic allocation. I want to know whether I can get the container on heap, through an allocator property or is there any better way to do so?

Aucun commentaire:

Enregistrer un commentaire