print contents of array

I am trying to print the contents of perSecondData below. How do I tell cout or printf to output contents perSecondData[3] for example?

1
2
3
4
5
6
7
8
9
10
11
typedef struct _tagTSample
{
  float front;
  float rear;
} TSample;

typedef struct _tagTCalculator
{
  TSample perSecondData[60];
} TCalculator;




Last edited on
Something like:
printf ( " %f %f ", perSecondData[3].front, perSecondData[3].rear);

Is this C++ or C? In C++ the typedef struct style is unnecessary.
Last edited on
Topic archived. No new replies allowed.