El codigo compila pero el ejecutable no funciona tal como la imagen de el link
http://www.subirimagenes.com/imagen-imagen1-8658261.html
Código (cpp) [Seleccionar]
#include <cstdlib>
#include <iostream>
using namespace std;
struct Item{
int Peso;
int Volumen;
string Nombre;
};
struct Maleta{
int Peso;
int Volumen;
int Cantidad_Items;
Item *Items;
};
int main(int argc, char *argv[])
{
Maleta *Mi_Maleta=new Maleta[10];
Mi_Maleta->Items=new Item[10];
Mi_Maleta[1].Items[0].Nombre="Peras";
Mi_Maleta[1].Items[0].Volumen=12;
Mi_Maleta[1].Items[0].Peso=16;
system("PAUSE");
return EXIT_SUCCESS;
}
http://www.subirimagenes.com/imagen-imagen1-8658261.html