wow.  haven't seen OOP since i started Palm programming.  is that supported?

> -----Original Message-----
> From: Maarten L. Hekkelman [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, December 09, 1999 04:11 PM
> To: [EMAIL PROTECTED]
> Subject: ::new(p) Foo;
> 
> 
> Can anyone explain to me why this code generates a Privilage 
> violation when
> executing the new operator?
> 
> #include <Pilot.h>
> #include <new>
> 
> void Foo ();
> 
> class Bar
> {
> public:
>     Bar () : mValue (0) {}
> 
> private:
>     long mValue;    
> };
> 
> void Foo ()
> {
>     Bar **b = (Bar**)::MemHandleNew(sizeof(Bar));
>     ::MemHandleLock((VoidHand)b);
>     ::new(*b) Bar;
>     ::MemHandleUnlock((VoidHand)b);
> }
> 
> I really thought this was valid code...
> 
> -maarten
> 
> --
> Maarten L. Hekkelman                      http://www.hekkelman.com
> Hekkelman Programmatuur bv         mailto:maarten at hekkelman.com
> 
> 
> 

Reply via email to