PDA

View Full Version : string to const char



Lemmy
03-24-2003, 06:20 AM
Hi,

I was wondering if anyone can help me.Im trying to declare a string i.e.

string "Lemmy";

and then pass that into your average opengl text printing method which accepts const char

obviously you cnt do it directly, but does anyone know of a conversion method ??

Bob
03-24-2003, 06:37 AM
If you're talking about strings in C++, you can use the c_str method to return a null terminated const char *.

Lemmy
03-26-2003, 10:52 AM
Cheers bob, ill check that out.

Rob.