Results 1 to 5 of 5

Thread: How can we connect to a text file using C/C++?

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    Post How can we connect to a text file using C/C++?

    What is the method to write to and read from a external text file using C/C++?


  2. #2
    Junior Member
    Join Date
    Jan 2008
    Answers
    3

    Re: How can we connect to a text file using C/C++?

    wat do u mean by external text file

    u can read and write to a text file using CStdIOFile ( using MFC)

    or simple File ( non-MFC )


  3. #3
    Junior Member
    Join Date
    Feb 2008
    Answers
    28

    Re: How can we connect to a text file using C/C++?

    hi

    FILE *fp;

    fp = fopen( Fname, "r");
    fclose( fp );

    try with fread(), fwrite() and fscanf(), fprintf()


  4. #4
    Junior Member
    Join Date
    Jan 2008
    Answers
    1

    Re: How can we connect to a text file using C/C++?

    use fopen function to open a text file. there is no connection actually. in the function fopen the path of the file can be stated.


  5. #5
    Junior Member
    Join Date
    Mar 2008
    Answers
    4

    Re: How can we connect to a text file using C/C++?

    Use C input output functions to read and write to a text file.

    Have a look on this link...
    http://www.cs.bu.edu/teaching/c/file-io/intro/


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact