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
#include <vector>
-
- Posts: 1709
- Joined: Mon Oct 17, 2022 7:38 pm
- Location: Europe, Germany
Re: #include <vector>
Does your source file have a ".cpp" suffix to its name?
-
- Posts: 10
- Joined: Tue Feb 16, 2021 2:37 pm
Re: #include <vector>
Hello
The file has a .c
Kurt
The file has a .c
Kurt
-
- Posts: 9745
- Joined: Thu Nov 26, 2015 4:08 am
Re: #include <vector>
Then change it to be .cpp. The build system compiles .c files with a C compiler, and <vector> is a c++ thing.
Who is online
Users browsing this forum: Baidu [Spider] and 94 guests