Re: XForms: problem with fl_get_input

Robert S. Mallozzi (mallors@crazyhorse.msfc.nasa.gov)
Sun, 12 Oct 1997 13:17:16 -0500 (CDT)

To subscribers of the xforms list from "Robert S. Mallozzi" <mallors@crazyhorse.msfc.nasa.gov> :

On 12 Oct , Scott wrote:
> To subscribers of the xforms list from Scott <sbarron@n-link.com> :
>
> const char *model_num;
> model_num = fl_get_input(model_box);
> printf("%s", model_num);
>

This should be Ok. Try changing "%s" to "%s\n"

>
> p_dat.model = fl_get_input(model_box);
>
> Where p_dat is my structure and model is of type char I get an incompatible
> types in assignment error.

fl_get_input() returns const char *, and p_dat.model is char *. So
just do a cast:

p_dat.model = (char *) fl_get_input(model_box);

-- 
Dr. Robert S. Mallozzi
University of Alabama in Huntsville
http://cspar.uah.edu/~mallozzir/

_________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html Xforms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/