Advertisement
Guest User

Menu.cpp

a guest
May 24th, 2015
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.82 KB | None | 0 0
  1. #include<iostream>
  2. using namespace std;
  3. #include "FormaMenu.cpp"
  4. #include "RellenarVector.cpp"
  5. //Definiciones de las teclas/opciones
  6. const int OPCION_RELLENAR = 1;
  7. const int OPCION_COMPROBARref = 2;
  8. const int OPCION_RELLENAR2 = 3;
  9. const int OPCION_BINARY =4;
  10. const int OPCION_SALIR = 5;
  11. //Definición longitud array.
  12. const int MAX = 6;
  13.  
  14.  
  15. int main()
  16. {
  17.     int opcion;
  18.     int vector[MAX];
  19.     do
  20.     {
  21.         cout << "Introduce una de als opciones" << endl;
  22.         muestraMenuPrincipal();
  23.         cin >> opcion;
  24.         //Switch case apra controlar las distinats opciones.
  25.         switch (opcion)
  26.         {
  27.             case OPCION_RELLENAR:
  28.                 insertarValores(vector);
  29.                 MuestraValores();
  30.                 break;
  31.             case OPCION_COMPROBARref:
  32.                 break;
  33.             case OPCION_RELLENAR2:
  34.                 break;
  35.             case OPCION_BINARY:
  36.                 break;
  37.         }
  38.  
  39.  
  40.     } while (opcion!=OPCION_SALIR);
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement