sorry for the delayed answer.. I was on my vacations XD
well thanks for making a point @ovidiucucu
let me tell you that I already noticed that some people that participated here
are experienced somehow. For example Paul, he started not demostrating it by
making some subjetive comments but later he shown he is experienced enough.
It was really not my intention to disrespect him. so I apologize if that was the case.
for example this guy @laserlight
he doesn't seem to be experienced, since he only says useless things, mostly
subjetive to me, but he wasn't capable of reading a source code still. he
didn't read my code.
@laserlight I don't really care if you are having breakfast or taking a ride, I would mostly
care if you can read a source code and make objective comments on it.
Let me tell you that now you have 3 working examples in my first post,
I say it again, you have 3 codes and not 1.
so you can't just say "your code doesn't work" because you would need to specify
which one of the three.
I know the 3 codes are working, let me explain to you the 3 codes.
the first code was already discussed, it takes advantage or is exploiting the fact
that some compilers, maybe all, maybe some, or whatever, are arranging 10 static global (and initialized)
variables in a contiguous position, one next to the other.
I know this behaviour is not specified in the C/C++ specifications, that was already
discussed.
For that reason, I dediced to follow your suggestions and went to make the other 2
codes, which are using a 10-var struct and a 10-element array respectively, so you can be sure
that the internal elements are stored contiguously.
The code is portable (examples 2 and 3) since it takes into account the data size type and the pointer
size type.
Anyways, all this doesn't mean to be a library or something, is just a demostration
on the pseudopointers.
I understand now that this is maybe not for beginners , if so, it looks more like a "hack sytle" of coding, which doesn't characterize me.
Regards

