Thread: help reading in a file

  1. #1
    Registered User
    Join Date
    Jul 2003
    Posts
    3

    help reading in a file

    i am lost in reading a file into my program. i have to read from a file, so i have to open the file, but i have no clus how to do that, can someone help me?

  2. #2
    Wannabe Coding God
    Join Date
    Mar 2003
    Posts
    259
    tryed
    Code:
    FILE *fp;
    fp=fopen("filename","r");
    ?
    They say that if you play a Windows Install CD backwords, you hear satanic messages. That's nothing; play it forward and it installs Windows.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. opening empty file causes access violation
    By trevordunstan in forum C Programming
    Replies: 10
    Last Post: 10-21-2008, 11:19 PM
  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. Replies: 3
    Last Post: 03-04-2005, 02:46 PM
  4. Possible circular definition with singleton objects
    By techrolla in forum C++ Programming
    Replies: 3
    Last Post: 12-26-2004, 10:46 AM
  5. System
    By drdroid in forum C++ Programming
    Replies: 3
    Last Post: 06-28-2002, 10:12 PM