Thread: bug in menu for printing text file

  1. #1
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765

    bug in menu for printing text file

    What does my print function, only print after you choose to close the program?
    Also, how can I make my print function valid C++ if it's not already?

    The source is attached.

    *prays this umpteenth try at a post works*
    [EDIT]
    WOOHOO! It worked.
    [/EDIT]
    The world is waiting. I must leave you now.

  2. #2
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    >>What does my print function, only print after you choose to close the program?
    Possibly because you never fclose() the stream.

    >>how can I make my print function valid C++ if it's not already?
    read up on C++ io streams. There are plenty of guides about, here's one (I'm not saying this is a good one, just an example). Here's another reference.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  3. #3
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    > Possibly because you never fclose() the stream.
    DOH!

    > Here's another reference.
    Thank you Hammer for your help.
    I'll have a look.
    The world is waiting. I must leave you now.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic text file encoder
    By Abda92 in forum C Programming
    Replies: 15
    Last Post: 05-22-2007, 01:19 PM
  2. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  3. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  4. what does this mean to you?
    By pkananen in forum C++ Programming
    Replies: 8
    Last Post: 02-04-2002, 03:58 PM