Original Post
I''ve gotten around it, but I get the impression since I have the problem in one file but not the other that I have some bad code somewhere.... here is some code snippets from the two different files.
#ifndef H_POBJECTREF
class PENGINE_API PObjectRef;
#endif /* H_POBJECTREF */
//the object class
class PENGINE_API PObject
{
friend PObjectRef;
#ifndef H_PLIST
class PENGINE_API PList;
#endif /* H_PLIST */
//the list node class
class PENGINE_API PNode
{
friend PList;
First off, those H_P------ defines I put at the begining of each header as an inclusion guard. Next When I compile it the PObject class has NO problems (thanks to those guys that helped me with learning the friends stuff)... But the PNode class gives me these errors unless I write that friend line: friend class PList;
error C2433: ''PList'' : ''friend'' not permitted on data declarations
error C2501: ''PList'' : missing storage-class or type specifiers
error C2244: ''PList'' : unable to resolve function overload
I know I got around the compiler errors, but I''m still worried I have some bad code there with my lack of friend keyword experience.
O and I checked to see if PList was used before, I couldn''t find it anywhere in any of my include folders.
Pat - Ex nihilo nihilus