March 22nd, 2013, 04:32 PM
The goal of the code is to see if you can take two independent variables declared "next to each other", and guarantee that you can add an offset to get from variable A to variable B in a consistent...
March 22nd, 2013, 08:08 AM
After 20+ years of writing C++ apps, starting my own company that uses C++ based components, etc. I better know what "static" is used for. Also, I know you're new, but to let you know, it is against...
March 22nd, 2013, 04:30 AM
Well, you've just shown everyone here by saying this that you are not aware of two things:
1) Static variables are zero-initialized by default. So placing "= 0" does absolutely nothing. Even if...
March 22nd, 2013, 01:55 AM
In C++, you can't assume that variables declared together are contiguous in memory. It's just that simple, but for some odd reason you do not wish to accept that fact. The only way to guarantee...
March 21st, 2013, 04:20 PM
Why would anyone want to modify this code? I know you may be proud of the code (even proud enough to invent a name, "Pseudopointers"), but I bet it was never really reviewed by experienced C++...
March 21st, 2013, 10:59 AM
When you post code, it will get commented on.
The code you posted will not work on a system that has 64-bit pointers and 32-bit integers. Practically all Windows C++ compilers, including VC++,...
March 19th, 2013, 11:07 AM
I hope you told the beginner to use arrays, and not what you are posting now.
That is because no one would want to waste a lot of time writing code like this, when they simply use arrays.
You mean...