Code
#ifndef SERVICES_H
#define SERVICES_H
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <conio.h>
using namespace std;
class Servicio
{
public:
int Codigo, opc, dato, opcion, CodigoS;
string TServicio [20];
float Costo, Comision, goli;
int enc, gol, codservicio;
public:
void Capturar ();
void Mostrar ();
int Buscar (int);
int Modificar (int);
void Salir ();
};
void Servicio::Capturar()
{
do {
cout << " |------------------------------------------------------------------------|" << endl;
cout << " | Código | | | Comisión |" << endl;
cout << " | del | Servicio | Costo | al |" << endl;
cout << " | servicio | | | empleado |" << endl;
cout << " |------------------------------------------------------------------------|" << endl;
cout << " | 100 | Cable básico | 150 | 5 |" << endl;
cout << " |------------------------------------------------------------------------|" << endl;
cout << " | 101 | Cable total | 300 | 7 |" << endl;
cout << " |------------------------------------------------------------------------|" << endl;
cout << " | 102 | Cable total plus | 550 | 10 |" << endl;
cout << " |------------------------------------------------------------------------|" << endl;
cout << " | 103 | Internet + Cable | 469 | 12 |" << endl;
cout << " |------------------------------------------------------------------------|" << endl;
cout << " | 104 | Cable + Teléfono | 500 | 12 |" << endl;
cout << " |------------------------------------------------------------------------|" << endl;
cout << " | 105 | Cable + Teléfono + Internet| 635 | 15 |" << endl;
cout << " |------------------------------------------------------------------------|" << endl << endl;
cout << " Digite el código del servicio que desea contratar:" << endl;
cout << " En caso de contratar un servicio personalizado digite 0" << endl;
cout << endl;
cout << " ";cin >> codservicio;
switch (codservicio)
{
case 100:
CodigoS = 100;
TServicio [0] = "Cable basico"; <<<<<<<<<<<------------------------------------------------------------------------
Costo = 150;
Comision = 5;
cout << endl;
cout << " Número de la venta:" << endl;
cout << " ";cin >> Codigo;
goli = 0;
break;
My homework is in spanish.. if you need some translation just lmk pls
TServicio [0] = "Cable basico"; THIS IS WHAT IM ASKING WHERE AM I WRONG? WHEN I PRINT THAT IT JUST MAKE RANDOM NUMERS AND LETTERS
This post was edited by ClubRocker on Nov 19 2013 08:48pm