It is now time to test what we have done thus far.
To build your program, type the following commands at the linux prompt (the first line is of course not necessary if you are already in the ~/Documents/strom/build folder). You do not need to issue the meson ./build
command any more: meson is all set up and running meson install
is all that is needed to build strom
and copy the executable to the distr
directory.
cd ~/Documents/strom/build
meson install
You should now find an executable file named strom inside the directory ~/Documents/strom/distr. To run the program, type:
cd ~/Documents/strom/distr
./strom
The expected output of the program thus far is shown below:
Starting...
Constructing a Tree
Finished!
Destroying a Tree
The Starting...
and Finished!
lines are created by the main
function, while the other strings are output in the Tree
constructor and destructor. Note that there is no output from the Node
constructor or destructor. That is because, so far, no Node
objects have been created: we have created a Tree
with no nodes, not even a root node!