[C++-sig] Re: shared_ptr

aashish aashish at vrac.iastate.edu
Fri Jan 30 04:51:26 CET 2004


Hi, 

I am using shared_ptr and what I am doing is getting the "dictionary" for
the python side and storing pointers to that in  boost::shared_ptr which
pointes toward the C++ STL maps.. 

typedef std::map< std::string, std::vector<double> > ValueMap;
	
typedef boost::shared_ptr<ValueMap> ValueMapPtr;

Now what I wanted to do is ,  through this pointer I need to access the
elements of this map and for that I am doing something like this ...

ValueMapItr itr;
ValueMapPtr mValueMap;



itr = mValueMap->begin();


for (itr = mValueMap->begin(); itr != mValueMap->end(); ++itr)
{
	......
}


Now this is compiling  fine but when I tried to run the application I got
this error ...


> Debug error

Assertion failed: px! =0 file C:\.................boost\shared_ptr.hpp line
238 




I will appreciate if someone can help me on this issue ( this is very urgent
for my application)

Thanks. 

~aashish









More information about the Cplusplus-sig mailing list