Read and write the values of file
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 4 of 4

Thread: Read and write the values of file

Hybrid View

  1. #1
    Join Date
    Aug 2012

    Read and write the values of file


    the output of the password text file contains like this:

    776655443322 (password encoded)

    How to write the value in last line (3rd row) of the file.
    after that read and write or alter 3rd row value.
    I need logic using "C" language. Please do the needful.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by mr.sam1024; September 22nd, 2012 at 11:40 AM. Reason: altered the question in short form

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003

    Re: Read and write the values of file

    I know you haven't been here very long, but you've been here long enough to know this isn't the do my work for me forum.

  3. #3
    Join Date
    Aug 2012

    Re: Read and write the values of file

    altered the question in short form...

  4. #4
    Join Date
    Sep 2007
    Calcutta, India

    Re: Read and write the values of file

    Dear mr.sam,

    please read the C language manual/reference text available to you for the behaviour of file handles after the execution of the specific file read/write functions that you are using. The text should specifically mention the position of the file pointer before and after the read/write function calls.

    Also, there is a file function which I cannot remember about (due to lack of touch for long time) which actually lets you "surf" through a file. It would be good if GCDEF or some other senior member points out the name of that function for you. You may also find that function in your reference manual.

    If you do not posses a reference manual, there are a thousand C reference manuals on the internet. Also, you can find a C tutorial I created and distribute freely on the internet at [link][/link]. This tutorial contains all information about C language (well, more or less, it's been made from K & R second edition as the source), and going through it will give you a very comprehensive idea about C programming. But it will be difficult to search of this function here. You can try the last two session, it's in there somewhere.

    Best of luck
    Indrajit Paul

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center