Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 6 Suppose that you have the following definitions: struct timeType { int hr; double min; int sec; }; struct tourType { string cityName; int
Question 6
Suppose that you have the following definitions:
struct timeType
{
int hr;
double min;
int sec;
};
struct tourType
{
string cityName;
int distance;
timeType travelTime;
};
- Declare the variable destination of type tourType.
- Develop C++ statements to store the following data in destination: cityNameChicago, distance550 miles, travelTime9 hours and 30 minutes.
- Write the definition of a function to output the data stored in a variable of type tourType.
- Write the definition of a value-returning function that inputs data into a variable of type tourType.
- Write the definition of a void function with a reference parameter of type tourType to input data in a variable of type tourType.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started