Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ludwing Najera
4,596 Pointsi have no idea what this means
No visible @interface for 'shape' declares the selector 'alloc'
Please help me! i do not know what this means
10 Answers

Stone Preston
42,016 Pointsok it looks like you need to capitalize Shape. Class names usually start with a capital letter and if you followed along in the video your class is most likely named Shape. so try
Shape *shape = [[Shape alloc] init];

Stone Preston
42,016 Pointsit means your shape class doesnt have a method called alloc in its interface. Is this for a treehouse challenge or video? if so please provide a link

Stone Preston
42,016 Pointscan you please post the code that you are using in your main method

Stone Preston
42,016 Pointsdid you import your Shape.h in main.m? does your shape class inherit from NSObject?

Ludwing Najera
4,596 Pointsimport <Cocoa/Cocoa.h>
import "shape.h"
int main() { shape *shape = [[shape alloc] init];
return 0;
}
here

Ludwing Najera
4,596 Pointsimport <Cocoa/Cocoa.h>
import "shape.h"
int main() { shape *shape = [[shape alloc] init];
return 0;
}

Ludwing Najera
4,596 Pointsim sorry its acting funny

Ludwing Najera
4,596 Pointsimport <Cocoa/Cocoa.h>
import "shape.h"
int main() { shape *shape = [[shape alloc] init];
return 0;

Ludwing Najera
4,596 Pointsill try that

Ludwing Najera
4,596 Pointswell that failed and i think thats because the file shape.h is uncapitalized