EEVblog® Electronics Community Forum
Electronics => Microcontrollers => Topic started by: yalect on August 10, 2017, 12:48:04 pm
-
Hi,
I would like to ask you what is the difference between programming atmega in C and C++ or generally and
can I replace C with C++?
thank you
-
AVR-GCC does not have implementation of the C++ standard template library. Otherwise, you can use C++ if you want to. Arduino does it pretty successfully.
-
The C++ is object oriented language (OOP), C is procedural. With OOP languages is much clearer to work - one object/class with all related data and methods, while in procedural languages that is way more demanding...
With C++ compiler, you can use C sources without changes (there are actually some minor issues passing arguments on which should take care about, however that is not quite important for now).