Thanks for your input.
I find functors a bit obtuse, and I've spent more time on this than I should...just brute-forcing it...
Code:uint16_t sum = 0; for (int i=0; i<byteVec.size(); i++) { sum += ((i%2==0) ? byteVec[i]<<8 : byteVec[i]); }
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 5 of 5
Threaded View
Tags for this Thread |
Click Here to Expand Forum to Full Width |