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