does map create a permanent copy of pointers to temporary variables?
This is a discussion on does map create a permanent copy of pointers to temporary variables? within the C++ Programming forums, part of the General Programming Boards category; consider:
Code:
//---------------------------------------------------------------------------
#include <map>
#pragma hdrstop
//---------------------------------------------------------------------------
#pragma argsused
class foo
{
std::map<int,int*>m;
public:
foo()
{
int i=1;
m[0]=&i;
...