CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: flush()

  1. #1
    Join Date
    Mar 2003
    Location
    Auckland
    Posts
    9

    flush()

    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.
    Attached Files Attached Files
    tsacol

  2. #2
    Join Date
    Feb 2003
    Location
    Brazil
    Posts
    335

    strings end with a \x0

    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;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured