Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Muhammad Amir

macrumors newbie
Original poster
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
 
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

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.