-
Notifications
You must be signed in to change notification settings - Fork 242
Open
Description
Hey, could it be that the structure of std::vector changed?
This function doesn't seem to work for me.
Am I doing something wrong? Maybe for this code to work I need to use some c++ version or sdk in particular?
TY
`void readVector(DWORD vectorAddress)
{
struct _vector
{
DWORD* begin;
DWORD* end;
DWORD* tail;
};
_vector* vec = (_vector*)vectorAddress;
DWORD count = ((DWORD)vec->end - (DWORD)vec->begin) / sizeof(DWORD);
DWORD capacity = ((DWORD)vec->tail - (DWORD)vec->begin) / sizeof(DWORD);
printf("Vector has %d items and %d capacity\n", count, capacity);
for (int i = 0; i < count; i++)
printf("\tValue at %d is %d\n", i, vec->begin[i]);
}`
Metadata
Metadata
Assignees
Labels
No labels