Re: Cocoa/Windows parallel dvlpmt
Re: Cocoa/Windows parallel dvlpmt
- Subject: Re: Cocoa/Windows parallel dvlpmt
- From: John Stiles <email@hidden>
- Date: Mon, 2 Feb 2004 07:03:44 -0800
On Jan 31, 2004, at 3:52 PM, Darrin Cardani wrote:
Or should I use STL lists or vectors, and then in Cocoa have
a model object which owns the STL list of raw C++ objects, and do
likewise in Windows.
As I understand it, you can't use STL in Cocoa code. If nothing else,
you'll have problems with templates because of the "<>" bracket
syntax, if I recall correctly.
This is not true at all.
I love Cocoa as well as STL. Mixing them is easy and works quite well.
Obviously you can't pass a vector<> to something that expects an
NSArray*, etc, but there is no reason why STL can't be used in a Cocoa
app.
My largest Cocoa-based project is actually C++ at its core--I wrote a
large body of platform-neutral code, and then a front-end for Mac OS
(Cocoa) and Win32 (plain vanilla, not MFC); it was also easy to port to
Linux (SDL) as a portability test. All the cross-platform stuff was
done with C++ objects and a handful of templates, and the compiler
doesn't even skip a beat.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.