online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code   
Language
#include <string> #include <iostream> using namespace std; #define MAX_NOTAS 5 struct Student{ Student() //Constructor por defecto //Inicializa los miembros { for(int n=0; n<MAX_NOTAS; ++n) notas[n] = 0.00; promedio = 0.00; nombre = "Nombre por definir"; } string id; string nombre; double notas[MAX_NOTAS]; double promedio; }; int main(){ int numest=0; double sumnotas=0.0; cout<<"Ingrese el numero de estudiantes: "; cin>>numest; Student* students = new Student[numest]; // Mostrar arreglo inicializado for(int n=0; n<numest; ++n){ cout<<n<<" Nombre: "<<students[n].nombre<<"\t Notas:"; for(int m=0; m<MAX_NOTAS; ++m) cout<<" "<<students[n].notas[m]; cout<<"\t Promedio: "<<students[n].promedio<<endl; } // Ingresar Informacion de estudiantes for(int n=0; n<numest; ++n){ cin.ignore(1); cout<<" Nombre: " ; getline(cin,students[n].nombre); cout<<" ingrese "<<MAX_NOTAS<<" Notas por estudiante "<<endl; sumnotas = 0.0; for(int m=0; m<MAX_NOTAS; ++m){ cin>>students[n].notas[m]; sumnotas += students[n].notas[m]; } students[n].promedio=sumnotas/MAX_NOTAS; cout << "\t Promedio: " << students[n].promedio << endl; } // Mostrar arreglo final for(int n=0; n<numest; ++n){ cout<<n<<" Nombre: "<<students[n].nombre<<"\t Notas:"; for(int m=0; m<MAX_NOTAS; ++m) cout<<" "<<students[n].notas[m]; cout<<"\t Promedio: "<<students[n].promedio<<endl; } delete[] students; return 0; }

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