Question: C++ Problem: I am trying to write a function that sends a messege through a network of cities (linked list). I have included pictures of

C++ Problem:

I am trying to write a function that sends a messege through a network of cities (linked list). I have included pictures of the code, city struct, defult network setup (order of cities on default networkodes of link list) and failed test cases. The city struct can not be modified and the code can not call any functions that aren't included in the or standard library. Please help me solve this!

Default network path (Linked List of city names):

Los Angeles -> Phoenix -> Denver -> Dallas -> Atlanta -> New York -> NULL 

C++ Problem: I am trying to write a function that sends a

Code:

messege through a network of cities (linked list). I have included pictures

of the code, city struct, defult network setup (order of cities on

Code Runner Failed Test Cases:

default networkodes of link list) and failed test cases. The city struct

can not be modified and the code can not call any functions

that aren't included in the or standard library. Please help me solve

Purpose: populates the network with the predetermined cities @param head start of list @return head of list city* loadDefaultsetup(city *head) head = deleteEntireNetwork (head); head - addCity(head, NULL, "Los Angeles") city *tempCity tempCity = searchNetwork(head, head = addCity(head, tempCity, "Los Angeles"); "Phoenix"); tempCity searchNetwork(head, head = addCity(head, tempCity, "Phoenix"); "Denver"); tempCity= searchNetwork(head, head = addCity(head, tempCity, "Denver"); "Dallas"); tempCity= searchNetwork(head, head addCity(head, tempCity, "Dallas"); "Atlanta"); tempCity= searchNetwork(head, head = addCity (head, tempCity, "Atlanta"); "New York"); return head

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!