rsm1235

rsm1235

  • NA
  • 5
  • 0

how i can work with struct and union(union in struct .etc)

Feb 5 2006 6:53 AM

there're 3 types below i can't work out,please give the samples ,thanks


1?struct in union:

union Test1
{
         struct
         {
          long m_time;
          };
};

2?union in struct:

struct Test2
{
         SCHead    m_Head;
         union
         {
          long   m_tSumary[1]; 
          };

 };


3?complex union in struct

struct Test2
 {
      SCHead    m_Head;
      union
      {
             long   m_tSumary[1]; 

             struct {      
                        char   m_cClass;
                        };
      };

 };