Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Solve Errors in This C++ CLION - Maze Solver Program. #include #include const int MazeWidth = 30; const int MazeHeight = 20; const char MazeExit

 Solve Errors in This C++ CLION - Maze Solver Program. #include #include const int MazeWidth = 30; const int MazeHeight = 20; const char MazeExit = '$'; const char Wall = '#'; const char Free = ' '; const unsigned char SomeDude = 254; COORD MazeExitCoords; COORD StartingPoint; using namespace std; char Maze [MazeHeight][MazeWidth]; void FillDaMaze(){ MazeExitCoords.X = MazeWidth - 20; MazeExitCoords.Y = 2; StartingPoint.X = 3; StartingPoint.Y = MazeHeight - 3; for(int i = 0; i 

Code Which are causing Errors;

Errors;

#include - 'windows.h' file not found
COORD MazeExitCoords; - Unknown type name 'COORD' COORD StartingPoint; - Unknown type name 'COORD'
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),color); - Use of undeclared identifier 'STD_OUTPUT_HANDLE'
Sleep(50);- Use of undeclared identifier 'Sleep'

Warnings ;

SomeDude;- Clang-Tidy: Narrowing conversion from constant value 254 (0xFE) of type 'unsigned char' to signed type 'char' is implementation-defined
void PrintDaMaze(int color){ - All calls of function 'PrintDaMaze' are unreachable
for(int i = 0; i 
if(Maze[StartingPoint.Y + 1][StartingPoint.X] != Wall && Maze[StartingPoint.Y + 1][StartingPoint.X ] != SomeDude){ StartingPoint.Y++; - Clang-Tidy: Repeated branch in conditional chain

Project Error List When I run the program:

image text in transcribed

If you can help me solve these errors, in my project to get it up and running I would be grateful for That, Thank You Very Much!

C++ 0 || ||| Problems: Current File 9 Project Errors main.cpp ~ CLion Projects/untitled1 9 problems O 'windows.h' file not found :2 Unknown type name 'COORD' :9 Unknown type name 'COORD' :10 Use of undeclared identifier 'STD_OUTPUT_HANDLE':46 Use of undeclared identifier 'Sleep' :100 A Clang-Tidy: Narrowing conversion from constant value 254 (OxFE) of type 'unsigned char' to signed type 'char' is implementation-defined :40 A All calls of function 'PrintDa Maze' are unreachable :45 A Clang-Tidy: Use range-based for loop instead :48 A Clang-Tidy: Repeated branch in conditional chain :61

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions