Re: BeAPI
By: art to All on Wed Apr 25 2012 07:29:15
Recently I have been familiarizing myself with the BeOS API, more specifically the more modern Haiku OS APIs. Is anyone else out there a
Haiku developer? Or BeOS, from ye days of yore?
I haven't developed for Haiku/BeOS, but I tried out BeOS back around 1998-1999 when it was originally being developed. I really liked the OS - It was fast and responsive. It was sad to see that Be, Inc. went out of business. I'm glad HaikuOS is in development, but it seems that it's probably far from being a complete system (at least compared to Windows/Linux/OS X).
While there are a few "official" books/tutorials on the subject of C++
Haiku programming, I find myself lacking the basic C/C++ skill to make the most of the Haiku APIs. Does anyone have a good source for learning C++?
The resource should be:
- short.
- aimed at people who already know programming and OOP, I don't need to
I learned C++ while taking classes in college, so I don't know of a shorter way offhand. But I've come across some some guides & web pages online over the years. If you want to get more familiar with C++, I'd look into these topics related to C++:
- General structure of a C++ program (i.e., C++ doesn't force OOP, and the main function is not part of a class)
- I/O streams (C++'s way of doing input and output)
- Basics of how to write a class in C++
- The STL (Standard Template Library): This is perhaps one of C++'s best strengths. The STL provides a set of template-based containers, such as linked list, set, map, multiMap, vector, deque, and a couple others, which can contain any data type. The STL also provides a set of functions and iterators for accessing and manipulating the containers that makes the STL very useful and poweful.
- C++ pitfalls and gotchas: Unfortunately, C++ seems to have more of these than other programming languages
Also, when looking for C++ guides, you should be wary of ones that contain bad programming C++ or bad style. Unfortunately, I've seen many of these.
Doing a brief search, this is a page I found as an intro to writing classes in C++:
http://pages.cs.wisc.edu/~hasti/cs368/CppTutorial/NOTES/CLASSES-INTRO.html
One tip I'd have for C++ is that in a class constructor, use the initializer list instead of the function body to initialize member variables. I've seen many examples of C++ classes that set member variables in the constructor body and don't use the initializer list, which is considered a bad C++ practice.
Nightfox