X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/b0999d0c64b37aee18260b6ba0f2dda47a974c6a..6eca7410b5a4c3c5225d852dd1d1ce9b74a7f4cd:/src/main.cpp diff --git a/src/main.cpp b/src/main.cpp index 0ad6845..c367a4c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,14 +1,23 @@ #include "btree.h" +#include "clave_fija.h" int main (int argc, char *argv[]) { - BTree *tree; + BTree tree ("test.idx", 64); + + if (argc != 2) { + printf ("Falta parametro cantidad de elementos a agregar\n"); + return 1; + } - tree = new BTree ("test.idx", 1024); + for (int i=0; i<=atoi(argv[1]); i++) { + ClaveFija c(i); - delete tree; + std::cout << "Agregando " << i << std::endl; + tree.AddKey (c); + } return 0; }