Thursday, January 2, 2014

objC tips I can not find my own definition of the class

 # import  
# Import "test1.h"
int main (int argc, const char * argv [])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

[[Fraction alloc] init];
float result = [Fraction calculate: 1.0 another: 2.0];
NSLog (@ "result is:% f", result);

[Pool drain];
return 0;
}


I could not find this code tips Fraction class.
How it happened?
Reply:
You did not contain fraction class header file it.
Reply:
Is included test.h
Reply:
No instantiation

Reply:
First learn basic grammar
Reply:
cited landlord sunshine_anycall reply:
C / C + + code
# Import
# Import "test1.h"
int main (int argc, const char * argv [])
{
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

[[Fraction alloc] init]; ......




 


NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];

Fraction * m_Fraction = [[Fraction alloc] init];
float result = [m_Fraction calculate: 1.0 another: 2.0];
NSLog (@ "result is:% f", result);

[Pool drain];




Reply:
# Import Fraction.h
Reply:
Look framework does not?
Reply:
Know, because they do not seem to support the property's sake
Results posted to the same sub-

No comments:

Post a Comment