i dont know but this not working for me im getting garbege value when i try to set char * value from function that returns std string :
string foo() { st
How about:
printf("%s", foo.c_str() );
Or better still, forget about using character pointers.