online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <iostream> #include <iomanip> using namespace std; int** generar_matriz(int n); void mostrar(int **p, int n); int main(){ int **A, **B, n=0; srand(time(nullptr)); cout<<"Ingrese n: "; cin>>n; A = generar_matriz(n); B = generar_matriz(n); cout<<" -> Matriz A:\n"; mostrar(A, n); cout<<" -> Matriz B:\n"; mostrar(B, n); return 0; } int** generar_matriz(int n){ int **p; p = new int*[n]; for(int i=0; i<n; i++){ p[i] = new int[n]; for(int j=0; j<n; j++) // llenando la matriz con valores aleatorios p[i][j] = rand()%21; } return p; } void mostrar(int **p, int n){ for(int i=0; i<n; i++){ for(int j=0; j<n; j++) cout<<" "<<p[i][j]<<"\t"; cout<<endl; } cout<<endl; }

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