Ver Mensaje Individual
  #2 (permalink)  
Antiguo 25/03/2017, 16:36
dehm
 
Fecha de Ingreso: septiembre-2010
Mensajes: 494
Antigüedad: 13 años, 7 meses
Puntos: 10
Respuesta: Pasar código a C++

Puede ser que te falte un cin >> opc; al final del bucle while?

Algo como:
Código C++:
Ver original
  1. int main()//<----NO void
  2. {
  3. ----------------------
  4.  while (Puerto->IsConnected())
  5.     {
  6.         cout << endl; // Dejamos un retorno.
  7.         cout << "Introduzca la opcion deseada: " << endl << endl; // Muestra texto en pantalla.
  8.  
  9.         cin >> opc; // Aquí introduces un número, el 1 o el 2.
  10.  
  11.         switch (opc)
  12.         {
  13.         --------------
  14.         }
  15.         while (true)
  16.         {
  17.         -------------
  18.         }
  19.         cin>>opc;
  20.     }
  21.     return 0;//terminar con return
  22. }
__________________
Mi calculadora en Qt