 agyna
		
			agyna
		
		
		
		
		
		
		
		
	
			06-08-2011 04:25 PM
Hi, I need some help here. I have 2 structures, the second one is used in the first one. How can I get the elements of the second structure.
typedef struct tagLayer3LongLatencyInfo
{
unsigned long ulMinimum; /
unsigned long ulMaximum; /
U64 u64Total; /
unsigned long ulFrames;
} Layer3LongLatencyInfo;
 
typedef struct tagU64
{
unsigned long high;
unsigned long low;
} U64;
How can I specify or get u64Total here
Here is what I tryied.
void getLat(int x,int y, int z)
{
 Layer3LongLatencyInfo INFO;
 U64 ELEMENT;
 
 INFO.ulMinimum =0 ;
 INFO.ulMaximum =0 ;
 // how can I specify u64Total
 INFO.ELEMENT.u64Total; // NOT SURE HERE
 
// Some codes.......
}
 
					
				
		
 RobertoBozzolo
		
			RobertoBozzolo
		
		
		
		
		
		
		
		
	
			06-08-2011 11:47 PM
Elements in nested structures can be accessed with the selection operatore in the same way as other element structures.
In your case, you do not need to declare a U64 variable in the function: "nephew" elements are accessed by using INFO.u64Total.high and INFO.u64Total.low
06-09-2011 10:55 AM
Thank you.