Question: Suppose that you have the following definitions: struct timeType struct tourType { { int hr; string cityName; double min; int distance; int sec; timeType travelTime;

Suppose that you have the following definitions:

struct timeType struct tourType { { int hr; string cityName; double min; int distance; int sec; timeType travelTime; }; };

Declare the variable destination of type tourType. tourType destination;

Write C++ statements to store the following data in destination: cityNameChicago, distance550 miles, travelTime9 hours and 30 minutes. tourType.cityName = Chicago; tourType.distance = 550; tourType.travelTime.hr = 9; tourType.travelTime.min = 30;

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!