objective c - Incompatible type for argument 1 of 'setBounds' -


I am trying to learn to do my own custom classes and learn more. I am receiving this error that is an incompatible type for a logic 1. I have defined a straight and class like this:

  typed enum {kRedColor, kGreenColor, kBlueColor} ShapeColor ; Typefifth {int x, y, width, height; } Shape diagram; @Inteface Size: NSOBK {shape color filler; Bound size; } - (zero) setFillColor: (ShapeColor) fillColor; - (zero) setbound: (dimension) border; - Draw (zero); @end // size  

Then I try to import Shape.h file (code above) and create a shape like this:

ID Size [4]; // I'm different!

Diagram rect0 = {0, 0, 10, 30}; Size [0] = [new size]; [Shapes [0] Setbounce: rect0];

I get an error Setbones are incompatible. For some reason it is not looking at the size .h square for the SetBounds method and instead viewing the default Setbones method? Am I doing something wrong? setBounds: then using a type of method

code> id < / Code> Usually the first encountered set ball: (to determine the return types and logic types) will result in choosing, and you probably do not already, it is giving error. Either you would like to say to the compiler that you want to use your to id to size * by changing Are , but you You can also enter your id in size * and it should also work:

  [(size *) size [0] Setbound: Reactin];  

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -