ebmDevMag.com home
ebm Developer's Magazine
links

developer's mag
main page

sections
part 1
part 2
part 3
part 4
part 5
part 6
part 7
part 8
part 9


6 - C/C++

6.01 - Is knowledge of C enough to program the ebm?
6.02 - How do I learn C? C++?
6.03 - Will other aspects of C++ be supported in the SDK?
6.04 - How can I save space when entering data?



6.01 - Is knowledge of C enough to program the ebm?
Yes and no. While a C programmer can hack along and get code working, to truly make the ebm shine, you'll want to get comfortable with C++. Some aspects, such as inheritance, make coding straightforward on the ebm, but a C-level workaround is not easy. Besides, C++ improves your job prospects, makes you more popular, and puts hair on your chest.

6.02 - How do I learn C? C++?
Practice. Write (and rewrite) code. Read the best books, and use that knowledge. Strive to understand what you're coding, the hows and the whys. That should do for a start

6.03 - Will other aspects of C++ be supported in the SDK?
This question generally crops up for exception support and the STL (standard template library). Exception handling involves try/throw/catch handling of bugs, and makes for nice clean code. According to the newsgroups, it is a possible addition, but not immediately. The STL is a nifty way to combine data and algorithms in an easy to use package. The clue should be 'easy to use'. What is easy for programmers often isn't for the computer, and the overhead of the STL (especially memory allocation) can be problematic for a handheld.

6.04 - How can I save space when entering data?
If the data is predefined, use can use the extern keyword to avoid double-defining:
  const x[]={1,2,3};
Will create twice as much space - one copy of the original data, and then another copy of the x[] array, as well as spending time to copy over. Using extern avoids the second copy and the transfer:
  extern const x[]={1,2,3};
Of course, if you plan to write to this data (that is it isn't const), avoid this, as your data may be in a place that shouldn't be written to!



Previous Section
Next Section

Copyright © 2001-2006 ebmDevMag.com - Legal Notice