Error in buiding code

Discussion in 'iOS Programming' started by Muhammad Amir, Sep 11, 2009.

  1. Muhammad Amir macrumors newbie

    Joined:
    Sep 7, 2009
    #1
    hi,
    i ve made a simple calculator in which i m using an instance of another class in viewcontroller class(composition concept).Whenever i compile it i counter this error
    "fatal error:"method definition not in @implementation context" this error occurs in viewcontroller.m and applicationdelegate.m
    anyone could tell me about this
    thanx


    Amir
     
  2. HerQ macrumors newbie

    Joined:
    Jun 11, 2008
    Location:
    The Netherlands
    #2
    You've probably used a method outside an @implementation block. You can use plain C functions outside classes, but you cannot use methods outside of a class implementation.

    Look at the Apple Documentation for the basics of Objective-C classes and you may find out how to solve the problem.

    Additionally, it would come in handy to post some code when you have a compiler warning. This would give us a little (actually, quite a lot) more information on how to solve the problem.
     

Share This Page