Advertisement
Guest User

Untitled

a guest
Jun 20th, 2019
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. inst= new GrupoInstalaciones;
  2. inst->i = new Instalaciones;
  3. this->inst = (GrupoInstalaciones*)malloc(sizeof(GrupoInstalaciones*));
  4. inst->tamanyo = 1;
  5.  
  6. inst->i = (Instalaciones*)malloc(sizeof(Instalaciones*)*inst->tamanyo +1);
  7. inst->i->HORAS_DISPONIBLES = (int*)malloc(sizeof(int*)* 7 +1);
  8.  
  9. inst->i->HORAS_DISPONIBLES[0] = 0;
  10. inst->i->HORAS_DISPONIBLES[1] = 14;
  11. inst->i->HORAS_DISPONIBLES[2] = 15;
  12. inst->i->HORAS_DISPONIBLES[3] = 16;
  13. inst->i->HORAS_DISPONIBLES[4] = 17;
  14. inst->i->HORAS_DISPONIBLES[5] = 18;
  15. inst->i->HORAS_DISPONIBLES[6] = 19;
  16. cout <<"5"<<endl;
  17. inst->i->HORA_APERTURA = 13;
  18. cout <<"5"<<endl;
  19. inst->i->HORA_CIERRE = 20;
  20. inst->i->NOMBRE = (char*)malloc(sizeof(char*)+1);
  21. inst->i->NOMBRE = (char*)"Polideportivo mis huevos";
  22. inst->i->TAMANYO_HORAS_DISPONIBLES = (int)malloc(sizeof(int));
  23. inst->i->TAMANYO_HORAS_DISPONIBLES = 7;
  24. cout << inst->i->HORAS_DISPONIBLES[0] <<"ssajsalijdsailjdaisj"<<endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement