main()
{
/* Define default values: */
int n = 0;
float x = 0.0;
/* Define contents of dialog window */
create_int_dialog_entry("n", &n);
create_float_dialog_entry("x", &x);
/* Create window with name "Setup" and top-left corner at (0,0) */
set_up_dialog("Setup", 0, 0);
/* Display the window and read the results */
read_dialog_window();
/* Print out the new values */
printf("n = %d, x = %f\n", n, x);
}
Compile this program using the alias Cgfx (see the page on compilation) to link in all necessary libraries.
{
/* Define default values: */
int n = 0;
float x = 0.0;
/* Define contents of dialog window */
create_int_dialog_entry("n", &n);
create_float_dialog_entry("x", &x);
/* Create window with name "Setup" and top-left corner at (0,0) */
set_up_dialog("Setup", 0, 0);
/* Display the window and read the results */
read_dialog_window();
/* Print out the new values */
printf("n = %d, x = %f\n", n, x);
}
Compile this program using the alias Cgfx (see the page on compilation) to link in all necessary libraries.