   std::string problem
  As i so recently joined and got SDL working (yay), i've been following some tutorials. The one problem that remains is as:Quote:main.c:24: error: `string' is not a member of `std'main.c:25: error: expected `,' or `;' before '{' tokenand the code of lines 24-25 is:Quote:SDL_Surface *load_image( std::string filename ){Any help is apreciated as always, ty.   
  Are you including the string header file?#include <string>Chad   ;  First observation, you probably shouldn't be using the extension '.c' for a C++ file as it's conventionally used for C.Also, kind of the obvious question: are you including <string>?- o   ;  yes i am including - #include <string.h> - and thanks for pointing out the file extension, but it didn't change anything. I'm still getting the same error.EDIT: strangly, i just changed <string.h> into <string> and it worked 0_owhy is that so?   ;  You are supposed to include <string> without the .h   ;  You should be doing#include <string>If your tutorial or whatever is telling you to include <string.h> it is out of date. :)   ;Quote:Original post by charlandoyes i am including - #include <string.h> - and thanks for pointing out the file extension, but it didn't change anything. I'm still getting the same error.string.h is deprecated.  Just #include <string>.  That might be why it can't find string in the std namespace.EDIT:Man, I'm slow today.   ;Quote:Original post by charlandoyes i am including - #include <string.h> - and thanks for pointing out the file extension, but it didn't change anything. I'm still getting the same error.string.h is c's libraries header for manipulating c-style strings.You want to try and #include <string>. There is no extension on the standard c++ library header files.   ;  ok, thankyou for your help, it is most apreciated. So kind, you all are :)   ;  string.h is a different thing altogether. It contains C 'string' manipulation functions like strcat, strlen etc.But if for some reason you need those in a C++ program anyway, you should instead include <string>, which is where they now live. Plain old <string> holds the real std::string.   