Description Title Structure Problem In a file titled Struct.cpp, define a structure that can represent a physical object
Posted: Mon May 09, 2022 6:25 am
Description Title Structure Problem In a file titled Struct.cpp, define a structure that can represent a physical object by using three (3) integral or floating-point member variables. You cannot use the Book type discussed during lecture. Implementation Your solution must include a valid struct definition with an appropriate structure tag (i.e. name). (2 points) Your structure must include three (3) integral or floating-point member variables. (2 points each == 6 points)
In a main() function, you must create a variable of your structure type. Then, assign a value to one (1) of your structure variable's members using a valid arithmetic expression. If you choose a bool type for any of your members, an assignment of a simple bool literal of true or false will suffice. (1 point) Finally, output the value of your selected member variable to the terminal using an insertion operation. (1 point)
In a main() function, you must create a variable of your structure type. Then, assign a value to one (1) of your structure variable's members using a valid arithmetic expression. If you choose a bool type for any of your members, an assignment of a simple bool literal of true or false will suffice. (1 point) Finally, output the value of your selected member variable to the terminal using an insertion operation. (1 point)