Hello, I need to make a program to read a text file and set it to a label...
I thought I could use fgets and popen to do it but I'm lost on programming it!!
Check out the code:
FILE *page= (FILE *)popen("cat rox.txt","r");
GtkWidget * label = lookup_widget(GTK_WIDGET(button), "label1");
I know that gtk_label_set_text is waiting a gchar, and I'm not sending a gchar, that's why I thought fgets would help but I couldn't do it too...
I'm lost, if anyone could please write these 3 lines of code working to set the label with a textfile would help a lot.
I've read much on google I'm almost giving it up...
Thanks for reading.