Question: Write a C++ program to find a path using the A* Algorithm. Prompt the user for the text file name containing the map. Then prompt
Write a C++ program to find a path using the A* Algorithm. Prompt the user for the text file name containing the map. Then prompt the user for the starting and stopping locations. The map has a header line which contains the number of rows and columns to follow. Each line after that contains a sequence of single digit numbers (without white space) indicating the cost to enter that location. A value of 0 indicates it is impassable. A horizontal or vertical move is that value. A diagonal move is 1.414 times that value of the square.
Output the total cost for the best path from the source to the destination and draw it (ASCII) on the screen.
Text file Example:
3 3
5-6-9-
8-1-0-
6-7-5
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
