why doesnt this work

Discussion in 'Mac Programming' started by Acorn, Feb 9, 2010.

  1. Acorn macrumors 68020

    Acorn

    Joined:
    Jan 2, 2009
    Location:
    macrumors
  2. robj macrumors regular

    Joined:
    Dec 23, 2009
    Location:
    Madrid, Spain
    #2
    Is this Objective-C ?

    If yes, the objects are usually declared as a pointer to the object.

    For example:

    MyTest* test123;

    And don't remember to alloc, initialize that object before you send any message to it.

    test123 = [[MyTest alloc] init];
     
  3. Acorn thread starter macrumors 68020

    Acorn

    Joined:
    Jan 2, 2009
    Location:
    macrumors
  4. ChOas macrumors regular

    Joined:
    Nov 24, 2006
    Location:
    The Netherlands
    #4
    Well, I seem to have no problem whatsoever when I create a pointer to a custom object with trailing numbers in the variable name.

    What is the compilation error ?
     
  5. Acorn thread starter macrumors 68020

    Acorn

    Joined:
    Jan 2, 2009
    Location:
    macrumors
    #5
    grrr now i cant repeat it. ive moved on in the book. before it had said the error was a missing ) before a constant. i removed the trailing number in the variable and it went away. i put it back and got the same error. took it away and it went away. next time I will check until im blue in the face.
     

Share This Page