converting an array of characters to a const gchar*
Posted
by Mark Roberts
on Stack Overflow
See other posts from Stack Overflow
or by Mark Roberts
Published on 2010-05-10T04:28:27Z
Indexed on
2010/05/10
4:38 UTC
Read the original article
Hit count: 265
I've got an array of characters which contains a string:
char buf[MAXBUFLEN];
buf[0] = 'f';
buf[1] = 'o';
buf[2] = 'o';
buf[3] = '\0';
I'm looking to pass this string as an argument to the gtk_text_buffer_insert
function in order to insert it into a GtkTextBuffer
. What I can't figure out is how to convert it to a const gchar *
, which is what gtk_text_buffer_insert
expects as its third argument.
Can anybody help me out?
© Stack Overflow or respective owner