class A
{
  B* b;}class B
{
  C* c;
  A* a;}class C
{
  B* b1;
}编译出错  missing storage-class or type specifiers请教问题所在及
解决办法

解决方案 »

  1.   

    更正:class A
    {
      BList* b;}class B
    {
      C* c;
      A* a;}
    typedef CTypedPtrList<CObList, B*> BList;class C
    {
      B* b1;
    }编译出错  出错在  BList* b;
        missing storage-class or type specifiers请教问题所在及
    解决办法
      

  2.   

    定义A的时候要用到BList,定义BList要用到B,定义B要用到A……每一个都不能先定义出来,搞什么啊?
      

  3.   

    在最前面加上
    class A;
    class B;
    class C;
      

  4.   

    class A;
    class B;
    class C;
    typedef CTypedPtrList<CObList, B*> BList;
    .........
      

  5.   

    解决办法很简单 :预声明就可以了方法如楼上:在最前面加上
    class A;
    class B;
    class C;其实只是 class B;预申明就可以了...
      

  6.   

    问题解决!
    解决方式原来的
    typedef CTypedPtrList<CObList, B*> BList;在B.H中声明了将其移到到 A.H中就行了可是
    原来的A.H中已经有了 #INCLUDE B.H了
    为什么不行呢
      

  7.   

    //a.h
    #if !defined(a.h)
    #define a.h
    .......
    ......
    .......
    #endif // !defined(a.h)
      

  8.   

    8753729(无语问苍天) 
      项目中是加分号的cngonet(VC的QQ群:4196043) 
      您说的已经定义了