I’m trying to use a list in a struct I have like this:
typedef struct _MS
{
DWORD id;
std::list<std::wstring> titles;
} MS;
But I’m having some problems when I try to use it.
When I look at it under the debugger at runtime ‘titles = 0xcdcdcdcd’, and when I try to call _iterator = MS.titles.begin() it fails with a memory access violation.
What am I doing wrong?
The value
0xcdcdcdcdis used by the MS compiler to mark memory that has been deleted.Your problem is likely not with
std::list, but with using a pointer to a deleted object.