#include<iostream>
struct inflatable
{
char name[20];
float volume;
double price;
};
int main()
{
using namespace std;
inflatable bouquet =
{
"sunflowers",
0.20,
12.49
};
inflatable choice;
cout << "bouquet: " << bouquet.name << " for $";
cout << bouquet.price << endl;
choice = bouquet;
cout << "choice: " << choice.name << " for $";
cout << choice.price << endl;
return 0;
}
Sample 4.12:assgn_st.cpp
最新推荐文章于 2021-09-04 19:30:40 发布