Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
Hi
If you printf an indexed array on MBED it comes out backwards;-i.e.
int a[3],ind = 0; etc etc
pc.printf("%d %d %d", a[ind++],a[ind++],a[ind++]);
it prints a[2] a[1] a[0] - i.e. it evaluates the index from the far end inwards. I haven't checked fprintf yet.
I don't remember it being like that when I did a lot of C programming on other systems and I don't have another compiler to hand. Is this normal C++ or is it a anomaly in the compiler? You can obviously get round it, but it just seems strange.