Newbie coming to Cocoa from the world of C++
Newbie coming to Cocoa from the world of C++
- Subject: Newbie coming to Cocoa from the world of C++
- From: Britt Green <email@hidden>
- Date: Wed, 5 Mar 2003 10:30:44 -0800 (PST)
Hello all,
I've recently picked up Learning Cocoa with Objective C in order to
write apps for the Macintosh. I'm coming from a C++ background and have
some basic questions about Obj C that I'm hoping people can answer.
Basically I'm trying to find analogues between the two languages.
1) In Obj C, instantiating an object is done like this:
NSObject * myObject = [NSObject alloc];
Is this equal to doing the following C++ command:
MyObject* foo = new MyObject();
2) In C++ one doesn't explicitly call the constructor when an object is
created. However, in Obj C one needs to call the init method, correct?
3) When using the @ sign in front of some quoted text, that
automatically converts that text into an NSString?
4) What's the difference between an id and a Class?
5) Obj C has two types of methods: class and instance. Are class
methods the same as C++'s static methods?
My apologies if these questions are answered in a FAQ somewhere. I
briefly looked for answers but didn't find any.
Thanks for the assistance!
Britt
=====
"The ocean, she is strange and wonderous, filled with animals that disturb even a Frenchman."
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
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.