Objective C LValue required as unary '&' operand

Posted by Bob on Stack Overflow See other posts from Stack Overflow or by Bob
Published on 2011-01-08T23:31:32Z Indexed on 2011/01/09 3:53 UTC
Read the original article Hit count: 211

Filed under:
|
|
|

Hello! In my code, I get this error when I try to get a pointer to my class property.
(I wrote a small *.OBJ file translator in Python, discarding the normals)
CODE:


//line: line of text
const char *str = [line UTF8String];  
Point3D *p1, *p2, *p3;
p1 = [Point3D makeX:0 Y:0 Z:0];
p2 = [Point3D makeX:0 Y:0 Z:0];
p3 = [Point3D makeX:0 Y:0 Z:0];
sscanf(str, "t %f,%f,%f %f,%f,%f %f,%f,%f",(&[p1 x]),&([p1 y]),&([p1 z]),&([p2 x]),&([p2 y]),&([p2 z]),&([p3 x]),&([p3 y]),&([p3 z]));
Triangle3D *tri = [Triangle3D make:p1 p2:p2 p3:p3];

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about pointers