#include #include using namespace std; struct str { int i; double d; }; int main() { str a[] = { {10, 10.0}, {20, 20.0}, {30, 30.0} }; const size_t n = sizeof a / sizeof a[0]; for (size_t i = 0; i < n; ++i) { cout << a[i].i << ", " << a[i].d << "\n"; } cout << "\n"; for (str *p = a; p < a + n; ++p) { cout << p->i << ", " << p->d << "\n"; } return EXIT_SUCCESS; }