vendredi 29 juillet 2016

C++: Pointer Arithmetic

I was reading a bit in Pointer Arithmetic, and I came upon 2 things I couldn't understand neither know it's use

address_expression - address_expression

and also

address_expression > address_expression

Can someone please explain them to me, how do they work and when they are used.

Edit:

What I meant to say is what do they produce if I just take two addresses and subtract them

And If I take two addresses and compare them what is the result or comparing based upon

Edit: I now understand the result of subtracting addresses, but comparing addresses I still don't get it.

I understand that 1<2, but how is an address greater than another one and what are they compared upon

Aucun commentaire:

Enregistrer un commentaire