vector or map

Can I use c++ vector or map and how ?

Thanks

Justin

(deleted)

Did you mean STL map and vector? What did you try? What happened?

You realize, I hope, that both map and vector are implemented as linked lists, and that the nodes in the list are dynamically allocated. That potentially can make swiss cheese of your memory and bring the Arduino to a halt.

Sorry the title was too general , I did mean STL vector and map . Essentially I need to determine standard deviation and need to keep track of data to calculate mean and then go back and compare it over specific intervals to calculate the stdv. Just thought of vectors because of the way it handles memory but I could go with just an array . The problem is the array size has to be flexible and want to avoid leakage.

thanks

Justin

PaulS: You realize, I hope, that both map and vector are implemented as linked lists.

No they certainly are not. A vector is supposed to have constant-time random access (impossible for a linked list), and a map will typically use a binary tree arrangement.