Variable Problem



Hi, I'm starting to program in C/GTK+ and I have a problem with a variable. Let me show the code and the error:

/*-- Global Variables --*/
   char               query_string[256];
   GtkWidget     *entry_sql;
.
.
.

/*-- Do the instruction SQL --*/
   sprintf(query_string, entry_sql); // Build the instruction SQL
   res = PQexec(conn, query_string); // Send the SQL to the database

I need to pass the value in GtkWidget *entry_sql to the char query_string[256] (a C variable), because when i compile it i receive the following error:

[Warning] passing arg 2 of `sprintf' from incompatible pointer type

How can i solve this problem?

Thanks.

Wilton



	

	
		
_______________________________________________________ Promoção Yahoo! Acesso Grátis: a cada hora navegada você acumula cupons e concorre a mais de 500 prêmios! Participe! http://yahoo.fbiz.com.br/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]