Thread: FILE pointers

  1. #1
    Registered User
    Join Date
    Aug 2001
    Posts
    8

    Cool FILE pointers

    How do u pass file pointers by reference. I want to use a function to open a file but, I have trouble doing this, because once it gets out of the function the pointer isn't pointing to the file anymore. Can someone please help.

  2. #2
    Unregistered
    Guest
    Code:
    FILE * Function(FILE *fptr, filename)
    {
       return fptr = fopen(filename, "r");
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Data Structure Eror
    By prominababy in forum C Programming
    Replies: 3
    Last Post: 01-06-2009, 09:35 AM
  2. Formatting a text file...
    By dagorsul in forum C Programming
    Replies: 12
    Last Post: 05-02-2008, 03:53 AM
  3. help with text input
    By Alphawaves in forum C Programming
    Replies: 8
    Last Post: 04-08-2007, 04:54 PM
  4. Simple File encryption
    By caroundw5h in forum C Programming
    Replies: 2
    Last Post: 10-13-2004, 10:51 PM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM