Error #include <string> while compileing

I have download a library called FirebaseArduino. When i trying to compile it i always get a fault (No such file or directory). I have tracked the fault to the library and row (#include )

I have no idea how to solve this problem? I thought that “string” was a standard class for C++ but my Arduino software can´t find it! Does someone know where i can download the string class?

Best regards

//Jocke

If I change the code from #include to #include <string.h> then the error disappear. But I get the same error on another lib (#include ) later in the same compilation!

I guess there is something wrong with my librarys. Anyone have a clue?

Please post a link to where you downloaded the FirebaseArduino library from.

Which board do you have selected in the Tools > Board menu?

I found the library at https://github.com/googlesamples/firebase-arduino

I've tried Arduino Uno, Nano, And Micro.

Jockeponkenboy: I found the library at https://github.com/googlesamples/firebase-arduino

github.com/googlesamples/firebase-arduino: This repo contains a collection of samples and an Arduino library that show how to call the Firebase API from the ESP8266 Arduino core.

I've tried Arduino Uno, Nano, And Micro.

Is any of those an ESP8266 board? (Hint: no.)

Jockeponkenboy:
If I change the code from #include to #include <string.h> then the error disappear. But I get the same error on another lib (#include ) later in the same compilation!

I guess there is something wrong with my librarys. Anyone have a clue?

C and derived languages standard for header files calls for file extension to be “h” such as “myFile.h” .
Therefore file without such extension will flag an error.
Real question is - does the “library” conforms to such standards?
Jim

julyjim: C and derived languages standard for header files calls for file extension to be "h" such as "myFile.h" . Therefore file without such extension will flag an error.

That's incorrect. You can include any file name you like. Try it out. There is some trickiness with the way the IDE does automatic include path handling with libraries and sketches but that has nothing to do with a "C and derived languages standard". The extension has nothing to do with this issue.

The problem is that, as the error message indicated, those files don't exist in the AVR toolchain. They do exist in the ESP8266 toolchain, which this library was written for.

The usual convention for include files is .h, which stands for "header". It has been this way since the blue book. All the standard libraries on C platforms everywhere AFAIK use that convention for the standard libraries, so it's a bit of a mystery why the source in this github project fiddles with it.

Arduino is C++, not C. The use of header files with no extension is completely standard. See http://en.cppreference.com/w/cpp/header

Some people also use .hpp and .hh for C++ headers. The Arduino developers even added IDE support for these extensions in libraries and sketches(#3186 and #3485) but there have been some regressions since that time that have caused some of this functionality to be lost.

Thanks all of you for all the answers! I'm a newbie at Arduino and C++ that's why I sometimes asking dumb questions. Sorry!

I thought that ESP8266 was the name of the WiFi card. And that's explain it all!

//best regards!

PaulMurrayCbr: The usual convention for include files is .h, which stands for "header". It has been this way since the blue book. All the standard libraries on C platforms everywhere AFAIK use that convention for the standard libraries, so it's a bit of a mystery why the source in this github project fiddles with it.

It's probably to be helpful to people like me who cannot type. It saves memory and it speeds up the compiler by few nanoseconds, right ? I often wonder if there is a current "ANSI C standard". It seem that Open philosophy means anything goes . What is interesting that fundamental subjects like this one often get "answered" - it is C++ , not C. Off soap box, back to coding.

Jim