IMG_LoadTyped_RW parameters

Hello,

I’m trying to write a small game, but when I call IMG_LoadTyped_RW it
didn’t work when I use std::string::c_str().
But when I use Image=IMG_LoadTyped_RW(SDL_RWFromFile(FileName.c_str(),
“rb”), 1, “TGA”); it compiles.

Why doesn’t it work?

Thanks in advance,
Christoph

Code:
#include <sdl/SDL.h>
#include <sdl/SDL_image.h>

class filesystem{
protected:

public:

SDL_Surface loadTexture(string FileName, string FileType){
SDL_Surface *Image;
Image=IMG_LoadTyped_RW(SDL_RWFromFile(FileName.c_str(),
“rb”), 1, FileType.c_str());
return *Image;
}
}

Error:
…filesystem.h In member function SDL_Surface engine::filesystem::loadTexture(std::string, std::string)': ...filesystem.h invalid conversion fromconst char*’ to char*' ...filesystem.h initializing argument 3 ofSDL_Surface*
IMG_LoadTyped_RW(SDL_RWops*, int, char*)’