[Stack] ์คํ - STL์ ์ด์ฉํ ๋ฏธ๋ก์ฐพ๊ธฐ
// #include "Location2D.h" #include #include using namespace std; const int MAZE_SIZE=6; //๋ฏธ๋ก๋งต ํฌ๊ธฐ ๊ณ ์ char map[MAZE_SIZE][MAZE_SIZE] = { //๋ฏธ๋ก๋งต ๋ฐ์ดํฐ {'1','1','1','1','1','1'}, {'e','0','1','0','0','1'}, {'1','0','0','0','1','1'}, {'1','0','1','0','1','1'}, {'1','0','1','0','0','x'}, {'1','1','1','1','1','1'}, }; //(r,c)๊ฐ ๊ฐ ์ ์๋ ์์น์ธ์ง๋ฅผ ๊ฒ์ฌ //(r,c)๊ฐ ๋ฐฐ์ด ์์ ์๊ณ , ๊ฐ์ด ๊ฐ ์ ์๋ ์์น '0'์ด๊ฑฐ๋ ์ถ๊ตฌ 'x'์ด์ด์ผํจ bool isValid..
2023. 7. 4.