Question: Pastebin of Code : https://pastebin.com/1jAUtDgi Detailed Algorithm 1. Define struct Dining containing the following 3 fields and 2 functions o name of dining location (string)

 Pastebin of Code : https://pastebin.com/1jAUtDgi Detailed Algorithm 1. Define struct Dining

containing the following 3 fields and 2 functions o name of dining

Pastebin of Code : https://pastebin.com/1jAUtDgi

Detailed Algorithm 1. Define struct Dining containing the following 3 fields and 2 functions o name of dining location (string) o coordinate x (double) o coordinate y (double) o default constructor Dining() o constructor with parameters Dining(const string& diningName, double x, double y) 2. Define readData() function that reads 3 fields from an input file to an instance of Dining 3. Define printData) function that prints 3 fields of an Dining instance to an output file 4. Define a vector of Dining elements 5. Read and process the first part of the input file o read data to an instance of Dining o push it to the vector o repeat until you read line "end 0 0" Read and process the second part of the input file o read location name to search into a string o find all occurrences of this string in the vector o for all found locations, print the location name and its coordinates to the output file and to the 6. console (cout) o repeat until you reach end of the input file Use the provided stub source code while writing your program (replace //ToDo comments with an actual code) Objective 1. review input/output from/to files 2. review structs 3. learn vector usage

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!