Good evening all,
Getting an opportunity to get a bit of programming in again at night. Started back working on some concepts that interest me and right now the focus is on a simple terrain and A* path-finding. In an effort to learn bare bones I've not utilized any of the STL to date and have gotten away with Casey's bulk arena allocation and PushStruct / PushArray style container / memory management.
That was until I started turning some pseudo A* code into actual implementation code. Here for the first time, since the # of path points is unknown and I need to erase the open list, etc. I found that a dynamic array would likely be the best way to store the calculated way-points. In lieu of writing my own dynamic array implementation tonight, I started with std::vector and ran into a bit of trouble.
After an hour of research and debugging, I found the first push_back call provided an error that EHsc needed to be turned on. Purely from an educational standpoint, why does the STL vector require exception handling to be turned on?
Also if I decide to continue using the STL vector container moving forward, what is the biggest performance improvement technique? The one I'm assuming to prevent all the resizing would be pre-allocating size if it can be determined ahead of time?
Thanks in advance.