NB, C++ beginner here, but I have reasonable experience coding in other languages (and significantly less sophisticated development environments).
I am working in visual studio using visual micro to work on an arduino project. The details of the project are not important, as, at this point, I am encountering the error in a completely empty .ino/.cpp file:
fatal error: string: No such file or directory #include <string>
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ^~~~~~~~ compilation terminatedAn error was encountered during the 'Deep Search' library discovery process. Build failed for project 'CylinderPrinter'
#include <string>
// the setup function runs once when you press reset or power the board
void setup() {
string h = "";
}
// the loop function runs over and over again until power down or reset
void loop() {
}
I have tried a number of things so far, as this seems to be a somewhat common error:
As far as I can tell, I have made no meaningful progress. Here are some additional screenshots that could possibly be helpful:
Please let me know if there's additional information that could prove helpful.
... . . . ...
so, the standard library is provided by the compiler. For the most popular ones, like gcc, clang, or msvc, the provided library is 99% standard compliant. But some micro controller compilers might not have STL support. Check the Arduino STL support for your compiler. And as far as I know, there's an official Arduino IDE, try using that