>Could anyone of you tell me how to convert string to const char* in C
const char *p = my_string;
>function c_str() is not working
Are you working with C or C++? Make up your mind. C doesn't have a string type, and C++'s string type is incompatible with C.
Narue
Bad Cop
15,460 posts since Sep 2004
Reputation Points: 6,464
Solved Threads: 1,401