|
Gimp Tool Kit gchar Widget comparison...
i'm trying to see if a variable is NULL or if there is nothing assigned to it and if so continue with plan. however its no working properly:
fstream File;
const gchar *filename = gtk_entry_get_text(GTK_ENTRY(name));
/* if filename is empty then it supposed to out to the screen
that you need to enter a name in the name field.
*/
if(filename != NULL) // i've also tried(f != "")
{
if(pwd == confirm_pwd);
{
File.open(filename,ios::out);
File.close();
}
}else{printf("You must enter a name.");}
it doesnt do the comparison properly and goes through with creating a blank file name. is there anyway to check the contents to see if its empty or not?
|