diff options
| author | Mitsuo Tokumori <[email protected]> | 2023-08-18 01:56:52 -0500 |
|---|---|---|
| committer | Mitsuo Tokumori <[email protected]> | 2023-08-18 01:56:52 -0500 |
| commit | 49d4392ca1972c8d66b1015f2cdda414d94812b8 (patch) | |
| tree | 13585bcb546d97b96ec669457c06fc27f2d66ab7 /2022-2/L8/mitsuo/LAB08_PREG01/Medico.cpp | |
| parent | d6e56dbe184cac37d7aa5cebe3e1db108dee4a28 (diff) | |
| download | LP1-49d4392ca1972c8d66b1015f2cdda414d94812b8.tar.gz LP1-49d4392ca1972c8d66b1015f2cdda414d94812b8.tar.bz2 LP1-49d4392ca1972c8d66b1015f2cdda414d94812b8.zip | |
Fix naming. Add leading 0 to lab names
Diffstat (limited to '2022-2/L8/mitsuo/LAB08_PREG01/Medico.cpp')
| -rw-r--r-- | 2022-2/L8/mitsuo/LAB08_PREG01/Medico.cpp | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/2022-2/L8/mitsuo/LAB08_PREG01/Medico.cpp b/2022-2/L8/mitsuo/LAB08_PREG01/Medico.cpp deleted file mode 100644 index 4b68781..0000000 --- a/2022-2/L8/mitsuo/LAB08_PREG01/Medico.cpp +++ /dev/null @@ -1,50 +0,0 @@ -/* - * File: Medico.cpp - * Author: mitsuo - * - * Created on 27 November 2022, 11:46 - */ - -#include <iomanip> -#include <iostream> -#include "Medico.h" -#include "aux.h" - -using namespace std; - -Medico::Medico() { - this->codigo = -1; - this->especialidad = new char [MAXLEN]; - this->nombre = new char [MAXLEN]; -} - -Medico::Medico(const Medico& orig) { -} - -Medico::~Medico() { - delete [] this->especialidad; - delete [] this->nombre; -} - -char* Medico::getEspecialidad() const { - return especialidad; -} - -int Medico::getCodigo() const { - return codigo; -} - -int Medico::read(std::istream & input) { - char c; - - input >> this->codigo >> c; - input.getline(this->nombre, MAXLEN, ','); - input.getline(this->especialidad, MAXLEN, '\n'); - return !input.eof(); -} - -void Medico::write(std::ostream & output) { - output << WL(8) << this->codigo; - output << WL(16) << this->especialidad; -} - |
