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)
Description Title Structure Problem In a file titled Struct.cpp, define a structure that can represent a physical object
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
Description Title Structure Problem In a file titled Struct.cpp, define a structure that can represent a physical object
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!