Author Topic: C language  (Read 12218 times)

0 Members and 1 Guest are viewing this topic.

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: C language
« Reply #25 on: April 10, 2014, 09:09:58 am »
I don't agree with that, overloaded new and delete to manage memory is better than vanilla C++ can do.
 

Offline con-f-use

  • Supporter
  • ****
  • Posts: 807
  • Country: at
Re: C language
« Reply #26 on: April 10, 2014, 11:22:19 am »
Just to put it out there Kim N. King, C Programming: A Modern Approach Its expensive but most university libraries have it. I like it very much.
 

Offline vaualbus

  • Frequent Contributor
  • **
  • Posts: 368
  • Country: it
Re: C language
« Reply #27 on: April 12, 2014, 11:07:52 pm »
I soeey but as you pointed out you I was totally totally wrong.
I try to said that to have the c++ feature you need a memory menager system that allocated and deallocate memory so some runtime code.
Of course you can compile C++ without C++ features.
 

Offline tiborsimon

  • Contributor
  • Posts: 13
  • Country: hu
    • tiborsimon.io
Re: C language
« Reply #28 on: April 14, 2014, 06:39:14 am »
I prefer C for small embedded projects. C++ has more power because the OO concept, but for a beginner it may be a bit confusing at the first glance.

If you want to play with C, there are a lot of online compilers (without debug of course):

http://www.compileonline.com/compile_c_online.php
http://codepad.org

A small example with codepad: http://codepad.org/OtxQ3Wa2

I usually test out algorithms and ideas using these tools. Hope it helps ;)
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: C language
« Reply #29 on: April 14, 2014, 07:02:19 am »
If you just want to program microcontrollers the buy an arduino starter kit and you can have stuff working within min's

+1

It comes with a first class and free C/C++ compiler, tons of examples, easy to install and use development environment (free of course), community and support forums, supports all mainstream operating systems and and gazillions of optional peripherals on ebay, all very reasonable priced.

Here is one random example

http://www.ebay.com/itm/UNO-R3-ATmega328P-ATmega16U2-2012-Version-Board-Free-USB-Cable-For-Arduino-/300948763268?pt=LH_DefaultDomain_0&hash=item4611f1b284
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: C language
« Reply #30 on: April 21, 2014, 03:53:49 pm »
If you just want to program microcontrollers the buy an arduino starter kit and you can have stuff working within min's

+1

It comes with a first class and free C/C++ compiler, tons of examples, easy to install and use development environment (free of course), community and support forums, supports all mainstream operating systems and and gazillions of optional peripherals on ebay, all very reasonable priced.

Here is one random example

http://www.ebay.com/itm/UNO-R3-ATmega328P-ATmega16U2-2012-Version-Board-Free-USB-Cable-For-Arduino-/300948763268?pt=LH_DefaultDomain_0&hash=item4611f1b284

+2

  The Arduino IDE uses a version of the popular open source gcc compiler, versions that can be obtained to run on a PC. As C++ is a superset of C you can choose to just use bog standard C statements in your arduino sketches (programs) without having to understand anything about C++ until you are ready to master them.  Most all the arduino supplied standard functions and libraries are C++ based but they work transparently without you having to understand of C++ classes work, etc.

 One has to be careful with trying to utilize too many of the C++ features (classes, OPP, etc) as most ucontrollers are very much SRAM limited so heap and stack space is at a premium. String functions are an example of being taxing on many 8 bit ucontrollers, and it's better to deal with them as arrays of characters using the simpler C functions.



 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf