Re: C++ templates?
Re: C++ templates?
- Subject: Re: C++ templates?
- From: "David Piasecki" <email@hidden>
- Date: Thu, 15 Apr 2004 14:04:31 -0700
I'm using Objective-C++, and I'm still rather new to it. I've got a
basic Cocoa application with some NSButtons, an NSImageView, and an
NSView, so my main just looks like this...
int main(int argc, const char *argv[])
{
return NSApplicationMain(argc, argv);
}
I create new C++ objects from my Objective-C++ controller class, and I
pretty much have the back end controlled with standard C++. I want to
keep all the GUI-related stuff in Objective-C and all the core
functionality in standard C++ for portability, ease of not learning too
much Objective-C (you Objective-C folks, don't beat me down for this...
I'm still learning), and because I might be integrating a good number
of C++ files into my code.
David
On Apr 15, 2004, at 1:52 PM, Allan Odgaard wrote:
>
On 15. Apr 2004, at 22:21, David Piasecki wrote:
>
>
> I didn't even have to use the template. Simply creating one in
>
> MyObject, as shown below again, will crash the program.
>
>
What does your main() do? If I compile your object with a dummy main
>
it does *not* crash.
>
>
> I don't use any objective-C objects with this template.
>
>
So is this at all related to ObjectiveC and/or Cocoa? Or is this just
>
a GCC problem with pure C++? If so, it would seem you have the wrong
>
list.
>
>
> Hmmm... I've always used templates that have the syntax <class Type>
>
> instead of <typename Type> like you do. Could that be the problem?
>
>
No. Typename and class are synonymous.
>
>
>
>
>
>
>
** Cocoa FAQ: <http://www.alastairs-place.net/cocoa/faq.txt> **
_______________________________________________
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.