i am developing a calculator in C using GTK+, the code below activates when the cosine button is clicked. i can read the text from the textview, but don't know how to assign the data in text to a char array. i would be grateful for any assistance.
static gchar str = "";
resultfld = GTK_ENTRY(lookup_widge(button, "entry1"));
text = gtk_entry_get_text(resultfld);
??????? str == text; /// need to asign data in *text to str ?????
num1 = strtod( str, &p);
num1 = cos(num1);