Embedded C developers shy away from C++ out of concern for performance. The class construct is one of their main concerns. My previous article Code Craft – Embedding C++: Classes explored whether ...
In the first part of this series, we covered the basics of pointers in C, and went on to more complex arrangements and pointer arithmetic in the second part. Both times, we focused solely on pointers ...
Output is 2.5 as expected. Of course for your specific example you'll use a local function and access the [1] index of the array. Rest is still the same.