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
Get step-by-step solutions from verified subject matter experts
