Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: C/C++ Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C/C++ Problem



On Tuesday, February 13, 2001, at 07:26 AM, email@hidden wrote:

The errors start with: undefined type: found 'class', illegal external
declaration: missing ; after 'Vector', and they just keep going and going.

I don't know how g++ could have accepted this code -- there are definitely
missing semicolons before the first two "}" characters.

class Vector
{
public:
float x, y, z;
Vector(float _x=0.0, float _y=0.0, float _z=0.0)
{ x=_x; y=_y; z=_z};

Need a semi after the "_z" ...

operator float *() { return &x };

Need a semi after the "x".


};

Hope this helps
-- Doug


References: 
 >C/C++ Problem (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.