I got the code building fine with C::B/MinGW
. It also seems to work correctly.
I have applied the solution proposed by Ceniza and made
peek() non-const. As told above, I have also commented the included files below from the
MyStack.h and
MyQueue.h:
#include <cassert>
#include <cstdlib>
Those included files are not needed.
At the beginning, I got the same problems as davereid20. Then, I have tried to add to the linker option
--allow-multiple-definition, make a clean and a build. It worked
. Then I have tried without
--allow-multiple-definition and it worked too (before building, I have made a clean). It seems that just a clean was needed
.
Michael