#include <iostream>
struct Book {
std::string name;
float price;
};
int main()
{
Book arr[] = { { "c++", 37 },
{ "java", 32 },
{ "c", 41 },
{ "python", 35 } };
for (const auto &b : arr) {
std::cout << b.name << " " << b.price << "\n";
}
}
/*
run:
c++ 37
java 32
c 41
python 35
*/