Re: Error diagnosis
SteveB wrote:
I have a problem with the following line if code:
OutStream << L" (+ " << std::dec <<
static_cast<DWORD>(Disp64) << L" bytes), ";
This line isn't doing anything peculiar, with very high probability it is
not the cause of your problem.
This is throwing the following exception:
Run-Time Check Failure #2 - Stack around the variable 'stIHM' was
corrupted.
stIHM doesn't even occur there and, as often with stack corruptions, it is
very possible that the code causing the error is in fact a bit away from
the code that then raises the exception.
I was wondering if anyone could interpret what the line of code is
actually doing and what the error means - a Google search has proved
fruitless
Well, look at the definition of OutStream and the overloaded inserters,
which should explain all (or, rather, it is explained in any basic C++
book). In case the L"text" is confusing you, that is a wchar_t string
literal. For the meaning of Disp64 you need to lookup whatever that is.
Anyway, in order to make sure that it is not this line, you could step
through it in a debugger and/or split it into four single << operations.
Uli