1.
Write the
Cake structure, which has instance variables name, color, diameter, and has_icing.
Solution.
Below is one way to implement the program. We declare the
Cake struct and list the instance variables in order.
#include <iostream>
using namespace std;
struct Cake {
string name;
string color;
double diameter;
bool has_icing;
};
int main() {
Cake c = { "Mary", "blue", 3.5, false };
}
