I'm new to Arduino, but fairly experienced with C++. I'm trying to use vectors in my project and I found multiple STLs online, but I'm having trouble integrating them into my project. Below is how I need to declare the vectors in the header file of my class.
vector x_location;
vector y_location;
I consistently get the following error, even after saving the STL files in the Arduino include folder and including them in my sketch and header file:
error: ISO C++ forbids declaration of 'vector' with no type
Using dynamic memory allocation on a processor with only 2K or so of RAM and no virtual memory is a bad idea. See Escher Technologies Articles on Formal Verification> for some reasons why. As most STL classes use dynamic memory allocation, this means you have to program without most of the STL.
You can simulate a vector using an array and a counter, you just need to decide in advance what is the maximum size you will ever let the vector grow to.
Also bear in mind that the compiler shipped the Arduino is rather old, so it may not have any support for features added in the last few years to the C++ language.