Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m pretty sure you have to take the size of the objects in mind.


No, these are equivalent.

The size of the objects is implicitly taken into account by the compiler, it knows the size of the objects by the type of the pointer.


"Pointer arithmetic" takes care of that. Adding an integer to a pointer will multiply the size of the type pointed to by the integer and adds that to the pointer.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: