1 typedef struct tag_guid
 2 {
 3     ULONGLONG utime;
 4     ULONGLONG umac;
 5 }tpguid;
 6 
 7 class A
 8 {
 9 private:
10     int m_teset1;
11 };
12 
13 //其他文件中的前向声明,注意结构体和类的区别
14 typedef struct tag_guid tpguid;
15 class A;
16 
17 //使用,注意使用前向声明的成员必须是指针
18 class B
19 {
20 private:
21     tpguid*    m_guid;
22     A*         m_a;
23 };

 



转:http://blog.csdn.net/rabbit729/article/details/7056415

相关文章:

  • 2021-10-21
  • 2021-10-27
  • 2021-09-30
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
猜你喜欢
  • 2021-09-14
  • 2021-04-21
  • 2021-10-29
  • 2022-12-23
  • 2022-01-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案