Arrays Vs Pointers

G

gwowen

On 19.02.2012 06:53, Kaz Kylheku wrote:
And I don't get what is so hard about
length = (pkt_ptr[0] << 8) + pkt_ptr[1];
pkt_ptr += 2;

One piece of code is intended to demonstrate how smart the programmer
is.
One piece of code intended to be understood, debugged and maintained
by humans, though personally I'd prefer (pkt_ptr[0] * 256).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top