Using std::vector

Hey everyone, I am trying to create and LCD selection menu and with that I am creating a specific class for buttons that will appear on the screen; also, I am trying to use callback functions to set actions for when buttons would be pressed. I was planning on using a vector with all the functions in it that way I could just call them from that. However, whenever I try to use std::vector I am met with an error and a message that says [clang] No template named 'vector' in namespace 'std'

I simply don’t know how to fix this problem. Am I forgetting to include a specific file somewhere? Has anyone else been having this issue or know how to solve it?

did you include the vector library in your code?

2 Likes

I’m using VEXCode, I was under the impression it was already included in the std library (along with std::string, which I am also using).

you need to include the header

#include <vector>
3 Likes

Yup! That did it. Thank you.