#include #include #include #include "fecha.hpp" #include "cuac.hpp" #include "diccionariocuacs.hpp" using namespace std; DiccionarioCuacs dic; void procesar_pcuac() { Cuac nuevo; nuevo.leer_pcuac(); dic.insertar(nuevo); cout << dic.numElem() << " cuac" << endl;; } void procesar_mcuac() { Cuac nuevo; nuevo.leer_mcuac(); dic.insertar(nuevo); cout << dic.numElem() << " cuac" << endl; } void procesar_follow() { string nombre; cin >> nombre; dic.follow(nombre); // follow muestra los mensajes del usuario } 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() { int cuacs = 1; string comando; while (cin >> comando) { if (comando == "pcuac") { procesar_pcuac(); cuacs++; } 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(); } } return 0; }