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! While you're at it, check out some resources Treehouse students have shared here.

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

iOS

i 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

ok 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];

it 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

can you please post the code that you are using in your main method

did you import your Shape.h in main.m? does your shape class inherit from NSObject?

import <Cocoa/Cocoa.h>

import "shape.h"

int main() { shape *shape = [[shape alloc] init];

return 0;

}

here

import <Cocoa/Cocoa.h>

import "shape.h"

int main() { shape *shape = [[shape alloc] init];

return 0;

}

im sorry its acting funny

import <Cocoa/Cocoa.h>

import "shape.h"

int main() { shape *shape = [[shape alloc] init];

return 0;

ill try that

well that failed and i think thats because the file shape.h is uncapitalized