Arduino IDE and C/C++ language: I still don't get it

I still do not get the relationship between Arduino IDE and C/C++: does programming in the Arduino IDE equals plain C programming or not ? In the latter case, what's the difference and what are the advantages to program in C/C++ ? Is it possible within the IDE ? Is there a tutorial somewhere ?

Thank you in advance.

I still do not get the relationship between Arduino IDE and C/C++

The IDE is a development environment that combines a text editor and access to the compiler, linker, and uploader in an easy to use method.

The language used to program the Arduino is C++. C++ is a superset of C, adding classes and changing the behavior of strcuts in subtle ways.

does programming in the Arduino IDE equals plain C programming or not ?

Yes, and no. There are things that the IDE does for you, like creating a main() function, calling init(), setup(), and loop(), adding include statements, and creating function prototypes for your functions. Other than that, the IDE does not alter your C/C++ code.

what are the advantages to program in C/C++ ?

The biggest advantage is that C/C++ is the only language you can program the Arduino is (except assembler, if you are really strange).

Is it possible within the IDE ?

Is what possible?

Is there a tutorial somewhere ?

Probably.

amundsen: I still do not get the relationship between Arduino IDE and C/C++: does programming in the Arduino IDE equals plain C programming or not ?

Yes, but rather one uses the full gcc C/C++ language. What many (not so aware people) refer to the arduino language are just arduino written C and C++ functions and classes that can be used or not used as you wish.

In the latter case, what's the difference and what are the advantages to program in C/C++ ? Is it possible within the IDE ? Is there a tutorial somewhere ?

Question does not apply, one uses C/C++ already when writing the source code, called a sketch of all things. ;) Thank you in advance.

Thanks for these answers.

Does this means one can import C++ (non-hardware related) libraries to extend the language ?

Does this means one can import C++ (non-hardware related) libraries to extend the language ?

Yes, bearing in mind that there is a limit to the amount of memory on the Arduino.

amundsen: Does this means one can import C++ (non-hardware related) libraries to extend the language ?

Absolutely. I have imported a "big number" library for example, and also a regular expression parser. In both cases the changes needed for the Arduino environment were pretty minimal.

Again, as PaulS says, remember you only have 32 Kb of program space, and 2 Kb of RAM on the "normal" Uno and similar. Don't get too carried away.

Arduino uses a version of GNU-GCC adapted for Atmel AVR microcontrollers. There are hardware-specific extensions such as direct register manipulation and ISR definition, and there are a few standard C++ facilities that are not available, e.g. the new and delete operators are not implemented. Good reading here: http://www.nongnu.org/avr-libc/

The STL does NOT come along for the ride, nor does most of the Standard C Library!

nor does most of the Standard C Library!

The parts that are relevant to the hardware do. Things like fopen() don't, but, the Arduino doesn't have a file system, so why should it?

At one point, was not a good chunk of the floating point library omitted?

At one point, was not a good chunk of the floating point library omitted?

Well, sprintf() can't handle the %f format specifier. I'm sure that there are a lot of things that are missing. You'd have to have a need for those things, and an understanding of why they are not present, to develop a workaround, or decide that the project and platform are not compatible.

Thanks again everyone for answering !

PaulS:

nor does most of the Standard C Library!

The parts that are relevant to the hardware do. Things like fopen() don't, but, the Arduino doesn't have a file system, so why should it?

Yes, you and I realize that, but the original poster hopes to move "existing" software from somewhere to the Arduino. Depending upon the Standard C/C++ features used that may not be possible - thus my comment.

thus my comment.

And it was a good point. I wasn't looking at it that way, but I probably should have.