title: How to call a variable inside another function
body: <p><strong>Hi,i have 2 functions that do a printf of what a i put in a text entry (used glade for GUI).
  like this:</strong></p>
  
  <pre><code>void on_adress_activate(GtkWidget * adress, GdkEvent * event, gpointer data)
  {
  const gchar *adress_text;
  adress_text=gtk_entry_get_text (GTK_ENTRY (adress));
  printf ("IP Adress: %s\n",adress_text);
  }
  
  void on_port_activate(GtkWidget * port, GdkEvent * event, gpointer data)
  {
  const gchar *port_text;
  port_text=gtk_entry_get_text (GTK_ENTRY (port));
  printf ("Port Number: %s\n",port_text);
  }
  </code></pre>
  
  <p><strong>Now i need to call the values of port_text and adress_text in another function that when i click a button on gui it should display another printf of them:</strong></p>
  
  <pre><code>void on_connect_clicked(GtkWidget * widget, gpointer user_data)
  {
  printf("Connection done%s,port%s\n",adress_text,port_text);
  }
  </code></pre>
  
  <p><strong>Is there a way to do this? please correct my code.I hope i was clear. 
  Thanks in advance</strong></p>