attempted 3-6.cpp

isEmpty has not been written but that's an obvious implementation. I had trouble with this problem and thought about a solution for a long time. We'll see how the solution is...