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/L08/mitsuo/LAB08_PREG01/SinReceta.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/L08/mitsuo/LAB08_PREG01/SinReceta.cpp')
| -rw-r--r-- | 2022-2/L08/mitsuo/LAB08_PREG01/SinReceta.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/2022-2/L08/mitsuo/LAB08_PREG01/SinReceta.cpp b/2022-2/L08/mitsuo/LAB08_PREG01/SinReceta.cpp new file mode 100644 index 0000000..5fdd043 --- /dev/null +++ b/2022-2/L08/mitsuo/LAB08_PREG01/SinReceta.cpp @@ -0,0 +1,49 @@ +/* + * File: SinReceta.cpp + * Author: mitsuo + * + * Created on 27 November 2022, 11:53 + */ + +#include <cstring> +#include <iomanip> +#include "SinReceta.h" +#include "aux.h" + +using namespace std; + +SinReceta::SinReceta() { + this->nombre = new char [MAXLEN]; +} + +SinReceta::SinReceta(const SinReceta& orig) { +} + +SinReceta::~SinReceta() { + delete [] this->nombre; +} + +void SinReceta::SetPacienteNombre(const char* nombre) { + strcpy(this->nombre, nombre); +} + +char* SinReceta::GetPacienteNombre() const { + return nombre; +} + +void SinReceta::SetDni(int dni) { + this->dni = dni; +} + +int SinReceta::GetDni() const { + return dni; +} + +void SinReceta::write(std::ostream & output) { + output << WL(12) << this->GetCodigo(); + output << WL(40) << this->GetNombre(); + output << WR(8) << this->GetCantidad(); + output << WL(12) << this->dni; + output << WL(20) << this->nombre; + output << '\n'; +} |
