Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nested C++ classes



I'm not sure if this is a C++ issue or a project builder issue since I seem to remember it happening in Codewarrior too, but why does this work:

class someClass
{
class nested
{
//...
int a(void) const { return 1; }
};

//...
}

but this tells me a() is not defined:

in .h:

class someClass
{
class nested
{
//...
int a(void) const;
};

//...
}

in .cpp:

int someClass::nested::a(void) const
{
return 1;
}

Any help is greatly appreciated, thanks in advance,


Francisco Tolmasky
email@hidden
http://users.adelphia.net/~ftolmasky
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.



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

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.