Page 1 of 1

#include <vector>

Posted: Fri Apr 28, 2023 5:25 pm
by kurtwerbrouck
hello

i want to use the #include <vector>,but i get a fatal error,

fatal error: vector: No such file or directory
11 | #include <vector>

i am using esp-idf,under visual code.

Any solutions?

Thanks

Re: #include <vector>

Posted: Sat Apr 29, 2023 6:46 pm
by MicroController
Does your source file have a ".cpp" suffix to its name?

Re: #include <vector>

Posted: Mon May 01, 2023 8:52 am
by kurtwerbrouck
Hello

The file has a .c

Kurt

Re: #include <vector>

Posted: Tue May 02, 2023 2:31 am
by ESP_Sprite
Then change it to be .cpp. The build system compiles .c files with a C compiler, and <vector> is a c++ thing.