X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/blobdiff_plain/31b3562c020843ce3f6900f0d02d4679710defd7..44c4c40e48cc4a72e81e0af80842738c45d6116f:/src/main.cpp?ds=sidebyside diff --git a/src/main.cpp b/src/main.cpp index c405fba..c367a4c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -5,10 +5,19 @@ int main (int argc, char *argv[]) { - BTree tree ("test.idx", 1024); - ClaveFija c(5); + BTree tree ("test.idx", 64); + + if (argc != 2) { + printf ("Falta parametro cantidad de elementos a agregar\n"); + return 1; + } - tree.AddKey (c); + for (int i=0; i<=atoi(argv[1]); i++) { + ClaveFija c(i); + + std::cout << "Agregando " << i << std::endl; + tree.AddKey (c); + } return 0; }