Hi, can some one explain to me the difference betweenand anCode:uin16_t
Thanks.Code:uint8_t array[2]
Printable View
Hi, can some one explain to me the difference betweenand anCode:uin16_t
Thanks.Code:uint8_t array[2]
It would probably be easier to list the similarities:
- They are the same size.
They differ in pretty much every other respect.
Thanks, so what is the better choice to storeanQuote:
2 BCD bytes
or anQuote:
uint16_t
?Quote:
unit8_t array[2]
2 uint8_t, because you have a byte, which is uint8_t and 2 of them.
When you use bigger sizes, you have to deal with endianess. But if you use an array, you don't.
2 BCD bytes? Don't you mean 2 BCD nibbles? It would only take one byte to store.