Thread: file opening problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Aug 2004
    Location
    San Diego, CA
    Posts
    313
    Quote Originally Posted by bigmac(rexdale) View Post
    oh ok, so fclose after i return fp? and i made the changes
    ...no. Once you return, your function is done. return() does just that - it returns the execution flow back to the calling function.

    You do not fclose() at all. That's the calling function's job.

  2. #2
    Registered User
    Join Date
    Oct 2007
    Posts
    118
    Quote Originally Posted by Lithorien View Post
    ...no. Once you return, your function is done. return() does just that - it returns the execution flow back to the calling function.

    You do not fclose() at all. That's the calling function's job.
    oh, thanks man helped me out alot

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  2. Formatting the contents of a text file
    By dagorsul in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2008, 12:36 PM
  3. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  4. Dikumud
    By maxorator in forum C++ Programming
    Replies: 1
    Last Post: 10-01-2005, 06:39 AM
  5. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM