Recommendations for C/C++

a big HELLO to the Arduino community. A couple of Q's I'm sure you can help with:

1) is Arduino software C or C++ or a hybrid C/C++ ?

2) I would like to get a fairly comprehensive book on whichever C language is used in Arduino to help me learn to code the Arduino properly. What would you suggest is the best book ... ? (e.g. perhaps "C for dummies" would be a good start, but is it comprehensive enough ?)

thanks ...

It's C++, but without "new" or "delete". Any book on embedded C/C++, but I've yet to come across a good one.

Nor the presence of the C++ Standard (Template) Library

is it comprehensive enough ?

A major point of the Arduino environment is that the 'full' c/c++ language is TOO "comprehensive" for most purposes.

See if you can find a book on using C for microcontrollers. I strongly suspect that anything on C++ will be strongly focused on things that don't work on an arduino (I'm not a C++ programmer, but as far as I can tell, a LOT of C++ programming instruction is about knowing/finding/using all the pre-defined "classes" that are relevant to your application.) (This is not at all unprecedented. Most languages include(d) extensive libraries and such that you were expected to learn as well as the syntax of the language itself...)

I've dabbled enough in C, C++, and C-like (or derived) languages to say that it is much easier to understand the Arduino C/C++ derived language once you know/understand how the standard works.

The majority of code you will come across will be mainly normal procedural C; you will find the occasional project (that isn't a library) that is C++ and OOP (object oriented programming), but from what I have seen so far, it is rare - but you'll probably see more of it as time passes (just like we did with javascript).

Most libraries, though, tend to be C++ and OOP based; which makes me wonder why the transition to full OOP hasn't happened to the extent you would think it would. Part of it may be that the size and design of most projects don't warrant the added complexity and partitioning of the code set that OOP brings. I tend to wonder if any of the various RTOS environments available for the ATMega are OOP-oriented, given their greater complexity...?


good info all round, many thanks