Remix.run Logo
squidgyhead 13 hours ago

I am cleaning up some pointer arithmetic stuff for multi-dimensional C style arrays. I managed to replace the code with a std::inner_product minus a std::accumulate (to accomodate for the fact that the upper array bound is exclusive, ie one-past-the-end).

avadodin 10 hours ago | parent [-]

I once "fixed" a port of a program to Linux.

It was generating the wrong output — that is: not the same as on Windows.

My fix initialized a thitherto uninitialized array with the VisualC++(ca. 5.0) debug build default value.