Author Topic: Programming atmega  (Read 1451 times)

0 Members and 1 Guest are viewing this topic.

Offline yalectTopic starter

  • Regular Contributor
  • *
  • Posts: 123
Programming atmega
« 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
 

Online ataradov

  • Super Contributor
  • ***
  • Posts: 11238
  • Country: us
    • Personal site
Re: Programming atmega
« Reply #1 on: August 10, 2017, 04:52:58 pm »
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.
Alex
 

Offline sasa

  • Regular Contributor
  • *
  • !
  • Posts: 168
  • Country: 00
  • Hobbyist in electronic
Re: Programming atmega
« Reply #2 on: August 10, 2017, 05:22:48 pm »
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).
The 30+ years professional desktop software designer and software engineer
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf