200, suma posicional, redispersión lineal
This commit is contained in:
15
main.cpp
15
main.cpp
@@ -4,22 +4,23 @@
|
||||
#include "fecha.hpp"
|
||||
#include "cuac.hpp"
|
||||
#include "diccionariocuacs.hpp"
|
||||
#include "tablahash.hpp"
|
||||
using namespace std;
|
||||
|
||||
DiccionarioCuacs dic;
|
||||
DiccionarioCuacs dic = DiccionarioCuacs(20000);
|
||||
|
||||
void procesar_pcuac() {
|
||||
Cuac nuevo;
|
||||
nuevo.leer_pcuac();
|
||||
dic.insertar(nuevo);
|
||||
cout << dic.numElem() << " cuac" << endl;;
|
||||
cout << dic.elem() << " cuac" << endl;
|
||||
}
|
||||
|
||||
void procesar_mcuac() {
|
||||
Cuac nuevo;
|
||||
nuevo.leer_mcuac();
|
||||
dic.insertar(nuevo);
|
||||
cout << dic.numElem() << " cuac" << endl;
|
||||
cout << dic.elem() << " cuac" << endl;
|
||||
}
|
||||
|
||||
void procesar_follow() {
|
||||
@@ -31,14 +32,12 @@ void procesar_follow() {
|
||||
void procesar_last() {
|
||||
int n;
|
||||
cin >> n;
|
||||
dic.last(n);
|
||||
}
|
||||
|
||||
void procesar_date() {
|
||||
Fecha f1, f2;
|
||||
f1.leer();
|
||||
f2.leer();
|
||||
dic.date(f1, f2);
|
||||
}
|
||||
|
||||
int main() {
|
||||
@@ -51,12 +50,10 @@ int main() {
|
||||
} else if (comando == "mcuac") {
|
||||
procesar_mcuac();
|
||||
cuacs++;
|
||||
} else if (comando == "last") {
|
||||
procesar_last();
|
||||
} else if (comando == "follow") {
|
||||
procesar_follow();
|
||||
} else if (comando == "date") {
|
||||
procesar_date();
|
||||
} else if (comando == "exit") {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user