Re: reading from a string

rouben@math.umbc.edu
Sun, 16 Feb 1997 15:51:01 -0500

To subscribers of the xforms list from rouben@math.umbc.edu :

> Code fragment below - in callback file.
> -------------------
> char *plain;
> char store[100];
> int x=0;
>
> void plaintext_cb(FL_OBJECT *ob, long data)
> {
> *plain = *fl_get_input(ob);
> for(x=0;x<=4;x++)
> {
> store[x]=*plain;
> plain++; // I am sure I have to reference the address here.
> printf(">%c\n",store[x]);
> }
> }

Change the line
*plain = *fl_get_input(ob);
to
plain = fl_get_input(ob);

-- 
Rouben Rostamian <rouben@math.umbc.edu>
_________________________________________________
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/xforms-archive/