iphone, objective-c, objective-c vs VC++

iphone, objective-c, objective-c vs VC++

    CString NSString
    [20] NSMutableArray [myArray insertObject:anObj atIndex:0];

    Objective-C
    #import “ClassName.h”
    @implementation ClassName : ItsSuperclass
    {
    instance variable declarations
    char *name;
    @private
    int age;
    char *evaluation;
    @protected
    id job;
    float wage;
    @public
    id boss;
    int boss;
    }
    method definitions
    @end
    Classname *ceo = [[Classname alloc] init];
    ceo->boss = nil;

    C++
    #include “ClassName.h”
    class Classname:public ItsSuperclass
    {
    variable declarations;
    char *name;
    private:
    int age;
    char *evaluation;
    protected:
    id job;
    float wage;
    public:
    id boss;
    int boss;
    }
    Classname *ceo =new Classname();
    ceo->boss = null;

    C++ code
    intfoo::callFoo(int foo)
    {
    int count;
    int result = 0;
    HelperObject object;

    for (count = 0; count < foo; count++) result += object.Value(count); return result; } Objective-C code
    intcallFoo:(int)foo
    {
    int count;
    int result = 0;
    HelperObject *anObject = [[HelperObject alloc] init];

    for (count = 0; count < foo; count++) result += [anObject value:count]; [anObject free]; return result; } recommend documents: #. C++ Versus Objective-C httpss://www.mactech.com/articles/mactech/Vol.13/13.03/CandObjectiveCCompared/