Some example output from my program
- Intro to checkpoint 2 of B+Tree lab.
- Checkpoint 1 demo:
- Compile a version of your program that runs test0 without DEBUG defined (this
test checkpoint 1 functionality).
- Run your checkpoint 1 version, redirecting I/O to an output file and
add, commit, and push the ouput file to your git repo (after checking that
it is not huge):
./wiscdb_main > chkpt1_out
# make sure the ouput file contains what you expect it should
# (if not: rm chkpt1_out, fix your program, try again):
ls -l chkpt1_out # should not be huge
# if it is okay, add it to your repo and push
git add chkpt1_out
git commit -m "checkpoint output"
- Next, copy the executable to another file:
cp wiscdb_main chkpt1
# DO NOT add this executable to your repo (remove it after you run it for me)
- Keep working and you can run chkpt1 for me when I get to your group.
- Work on B+Tree lab
This shows output from
tests I have for testing splitting nodes and for testing the BTreeIndex constructor that creates
the object from an already existing B+Tree file. Both are parts of the 2nd checkpoint functionality.
It also shows how I've added some command line options to main.cpp to specify number of tuples and which
test to run (I suggest doing something like this too to make testing checkpoint 2 and beyond easier,
particularly adding in a command line option to specify the number of tuples).
As you work on C++ labs, remember all these resources:
- Mapping a type onto a Raw Page
Some examples of mapping types onto arrays of bytes (the difference between creating
an object of a type and mapping a type onto a chunk of bytes (a Page in this lab)).
- Week 5 Monday lab: C++ strings and mapping
structures onto raw memory.
- Week 2 Monday lab: C++ exceptions, reference parameters, const
- Week 1 Monday lab: C++ programming, C++ debugging
tools (valgrind and gdb), C-style strings, other resources for CS lab work
There is lots of documentation also available off
my help pages
Under "Language Help" the C and C++ headings have a lot of information and
resources for C++ and C programming (and look under both for resources, most of
the common parts of the language are listed under my C resources), including
command line arguments in C (and C++).