urgent simple help needed 
Author Message
 urgent simple help needed

how do i open and read a text file in c? not c++


Sun, 27 May 2001 03:00:00 GMT  
 urgent simple help needed

| how do i open and read a text file in c? not c++


~$ man fopen

fopen(3S)            Standard I/O Functions             fopen(3S)

NAME
     fopen, freopen, fdopen - open a stream

SYNOPSIS
     #include <stdio.h>

     FILE *fopen(const char *filename, const char *type);

DESCRIPTION
     fopen() opens the file named by filename  and  associates  a
     stream  with  it.   fopen()  returns  a  pointer to the FILE
     structure associated with the stream.

filename points to a character string that contains the name
     of the file to be opened.

     type is a character string beginning with one of the follow-
     ing sequences:

          ``r'' or ``rb''          open for reading

          ``w'' or ``wb''          truncate  to  zero  length  or
                                   create for writing

          ``a'' or ``ab''          append; open  for  writing  at
                                   end  of  file,  or  create for
                                   writing

          ``r+'', ``r+b'' or ``rb+''
                                   open for update  (reading  and
                                   writing)

          ``w+'', ``w+b'' or ``wb+''
                                   truncate or create for update

          ``a+'', ``a+b'' or ``ab+''
                                   append;  open  or  create  for
                                   update at end-of-file

igorR, who loves man-files nowadays.
--
"Ma belle demoiselle, repondit Candide, quand on est amoureux, jaloux
et fouette par l'Inquisition, on ne se connait plus"
                                Voltaire, "Candide"



Mon, 28 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Newbie needs urgent help, simple question

2. URGENT HELP NEEDED! Simple Q on Triggers

3. URGENT URGENT dlopen() help needed...

4. Urgent Help Needed-Calling the help file.

5. Help !! (urgent) a simple program

6. URGENT HELP with a simple problem: reading file into string

7. 3 Simple Questions PLEASE HELP URGENT

8. Help !! (urgent) a simple program

9. 3 Simple Questions PLEASE HELP URGENT

10. Urgent Need help

11. Need Urgent Help::::: Printer

12. Urgent Help needed!

 

 
Powered by phpBB® Forum Software