How to #include <string> in C code
-
I have a sample code which uses C++ string. I understand that if I #include "x.cpp" file the compiler will compile it as C++ , however I am getting error just trying to #include in my main.c or my test.cpp file - "string" file not found. How can I fix this? I could just analyze the sample code and manually convert it to "c" code, but would prefer machine to do the dirty work instead. Thanks for your help. Vaclav
-
I have a sample code which uses C++ string. I understand that if I #include "x.cpp" file the compiler will compile it as C++ , however I am getting error just trying to #include in my main.c or my test.cpp file - "string" file not found. How can I fix this? I could just analyze the sample code and manually convert it to "c" code, but would prefer machine to do the dirty work instead. Thanks for your help. Vaclav
-
I have a sample code which uses C++ string. I understand that if I #include "x.cpp" file the compiler will compile it as C++ , however I am getting error just trying to #include in my main.c or my test.cpp file - "string" file not found. How can I fix this? I could just analyze the sample code and manually convert it to "c" code, but would prefer machine to do the dirty work instead. Thanks for your help. Vaclav