online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
#include <iostream> using namespace std; bool demo_maze(char maze[9][9], bool sam[9][9], int x, int y, int u, int v) { if(x == u && y == v) { sam[x][y] = true; for(int t = 0; t <= u; t++) { for(int f = 0; f <= v; f++) { cout << sam[t][f] << " "; } cout << endl; } cout << endl; return true; } if(x > u || y > v) return false; if(maze[x][y] == 'X') return false; sam[x][y] = true; bool right = demo_maze(maze, sam, x, y + 1, u, v); bool down = demo_maze(maze, sam, x + 1, y, u, v); sam[x][y] = false; if(right || down) return true; return false; } int main() { char maze[9][9] = {"0000", "00X0", "000X", "0X00"}; bool sam[9][9] = {0}; int u = 3, v = 3; bool ans = demo_maze(maze, sam, 0, 0, u, v); }

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue