I'm new to GTK+ and I get a segmentation fault error when I try to compile my program. I've isolated the cause of the error down to the following lines of code.
GtkTextBuffer *buffer;
char buffers[65535];
struct ip *ip;
.
.
.
ip = (struct ip *)buffers;
gtk_text_buffer_insert_at_cursor (buffer,ip->ip_protocol, -1);
(ip_protocol is a variable in the struct ip)
I'm trying to insert,at the cursor of a textview,the value of the char,"ip_protocol",situated in "buffers" using a pointer.Unfortunately I have to use a pointer in this case.Can anyone help with rectifying my code?