int main (int argc, char *argv[])
{
- BTree *tree;
- ClaveFija c(5);
-
- 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;
}