• BeAPI

    From art@FATCATS to All on Wed Apr 25 07:29:15 2012
    Hey all,

    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?

    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 re-learn what a function is and what ++ and -- mean. I would like to learn about casting, pointers, structs, and other C/C++-specifics. I'm coming from a C#, ECMAScript/JS and ruby background, mostly.
    - ANSI K&R, possibly POSIX. Please don't suggest a Linux, X11, or Windows specific resource.
    - medium-level. Hello world isn't gonna cut it.

    Thanks all! Hopefully I can pick up C++, something which I've wanted/avoided doing for well over a decade.

    Kind regards,

    art@fatcatsbbsdotcom

    "Chocolate ice-cream, chocolate fudge and chocolate chips.
    You aren't depressed, are you ?"
    "I'm fine, Commander."
    -- Riker and Troi in ST:TNG "The Game"

    ---
    ■ Synchronet ■ fatcats bbs - fatcatsbbs.com
  • From Nightfox to art on Sat May 5 15:26:25 2012
    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

  • From dams@FATCATS to art on Tue Oct 22 02:12:38 2013
    Re: BeAPI
    By: art to All on Wed Apr 25 2012 07:29:15

    most of the Haiku APIs. Does anyone have a good source for learning C++?

    Thinking in C++ or the one at http://tutotialspoint.com/cplusplus/ isn't bad too.

    ---
    ■ Synchronet ■ fatcats bbs - fatcatsbbs.com