I'd strongly recommend using C++, but don't go overboard on using
some of the 'advanced' C++ features such as virtual functions.
C++ gives you superior type checking, which means you catch
more errors during the compilation phase.
C++ also gives you the ability to hide your global variables,
and have default parameters to functions. And the 'constructor' /
'destructor' concept is a really good place to put memory allocation
and deallocation code to prevent memory leaks.
Having said all that, when you allocate a class object using new(),
it goes onto the (scarce) heap. So don't have any big arrays or
strings in your class definition, just pointers, and then allocate
non-heap memory for them inside your 'constructor'. Also don't
create large arrays of class objects for the same reason.
Note: Some people suggest writing a custom new() to avoid the
heap allocation issue, but personally I don't like creating my
own version of a standard function.
Roger Stringer
Marietta Systems, Inc.
>Subject: Re: Platinum question
>From: John Leung <[EMAIL PROTECTED]>
>Date: Sat, 23 Sep 2000 20:07:37 -0700
>X-Message-Number: 26
>On Fri, 22 Sep 2000 19:54:15 -0700, "B. Flaumenhaft"
><[EMAIL PROTECTED]> wrote:
>>Again: C++ isn't properly implemented on the Palm.
>
>Hmm. Does it mean that we really shouldn't be using C++ when
>programming Palm apps? Are there any known potential problems or side
>effects if you use C++?
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/