Strange problem with maze generation algorithm.

Started by
12 comments, last by MarkS_ 7 years, 3 months ago

I think it's safe to say we've all been there once or twice in our lives.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

Advertisement

I will say that I like my current revision much better. Far cleaner and easier to read.

Seriously, I was doing:


std::stack<Cell> *cell_stack;
.
.
cell_stack = new std::stack<Cell>;
.
.
delete cell_stack;

with pretty much ever type of container. It must have been while I was learning how to use them. :unsure:

Reading old code tends to clearly show you how much progress you have made in the art of programming :)

Reading old code tends to clearly show you how much progress you have made in the art of programming :)

When I originally wrote that I had a very negative view of C++ (still not 100% positive), but was dabbling in OOP. My understanding of smart pointers and containers was not all that clear. A std::vector is a dynamic array and you allocate dynamic arrays with malloc/new, so clearly...

This topic is closed to new replies.

Advertisement