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

Forum statistics

Threads
474,082
Messages
2,570,589
Members
47,211
Latest member
Shamestone

Latest Threads

Top