#include "animal.h"
#include <iostream>
#include <string>
#include <windows.h>

using tipo_funcion = animal*(__stdcall*)( );

int main( ) {
   std::string s;
   std::cin >> s;

   auto dll = LoadLibrary(s.c_str( ));
   if (!dll) {
      std::cout << "Error al cargar DLL\n";
      return 0;
   }
   auto funcion = (tipo_funcion)GetProcAddress(dll, "biblioteca");
   if (!funcion) {
      std::cout << "Error al buscar funcion\n";
      return 0;
   }
   
   animal* a = funcion( );
   a->haz_ruidito( );
   delete a;
}
