@ Bloodline
Thanks for your attempt to explain pointers to me. While this thank holds no irony (I always welcome occasions to think again about C++ stuff), you may have read that I alrady wrote that I have understood pointers and references is general. But when not programming too often, you soon end up in some mess.
And your suggestion to avoid pointers - well my own classes and so aree doing as much as possible. But when using the MS MFC or low level driver stuff or e.g. just want to open an Amiga window by using intuition.library you just cannot avoid heavy use of pointers.
Look, code like this is not easy to maintain if you are an occasional coder. Well, thing is it works, but if I try to reread my own code like e.g. this:
void DAQ::AOfillBuf(void* pwBuf, DWORD dwAoBufferSize,
DWORD dwClk, DWORD dwChListChan, DWORD dwMode) // fill buffer operations
{
DWORD* pdwBuffer = NULL;
WORD* pwBuffer = NULL;
pdwBuffer = (DWORD*)pwBuf;
DWORD *myLpvResult;
myLpvResult= reinterpret_cast(lpvResult);
...
}
I think it is not too intuitive (part of the mess I guess comes from MS and their many datatypes).
As said this is no rant against C++, but it is difficult when you use it only occasionally. And that is a thing many routined programmers often forget.