Click to See Complete Forum and Search --> : flush()


tsacol
March 15th, 2003, 10:44 PM
See attached code. The output when it is run should be;
1-JUL-28
101.10
202.20

Instead it is producing the following;
1-JUL-28
101.10A
202.20A

It think it is a priblem with clearing the buffer. Can someone throw some light on what is wrong.

Rabelo
March 16th, 2003, 12:14 AM
A string is an array of characters ending with a \x0. You forgot to end the strings with \x0. After each while you may do, for exemple, after the first while:

frst_strg[j] = 0;