+ Reply to Thread
Page 2 of 4 FirstFirst 1234 LastLast
Results 11 to 20 of 40

Thread: Reading and Writing Files in C

  1. #11
    arkanion is offline Newbie
    Join Date
    Jan 2010
    Posts
    10
    Rep Power
    0

    Re: Reading and Writing Files in C

    nice issue

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #12
    Phineas is offline Newbie
    Join Date
    Jan 2010
    Posts
    11
    Rep Power
    0

    Re: Reading and Writing Files in C

    Nice TuT.

  4. #13
    Join Date
    Sep 2009
    Location
    USA
    Posts
    3,400
    Blog Entries
    5
    Rep Power
    37

    Re: Reading and Writing Files in C

    Thank you.
    I'm glad this has been informative.
    Root Beer == System Administrator's Beer
    Download the new operating system programming kit! (some assembly required)

  5. #14
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Reading and Writing Files in C

    nice nice

  6. #15
    Join Date
    Jan 2010
    Posts
    18
    Rep Power
    0

    Re: Reading and Writing Files in C

    very nice

  7. #16
    arkanion is offline Newbie
    Join Date
    Jan 2010
    Posts
    10
    Rep Power
    0

    Re: Reading and Writing Files in C

    thanks

  8. #17
    se7en is offline Banned
    Join Date
    Nov 2009
    Posts
    30
    Rep Power
    0

    Re: Reading and Writing Files in C

    wow, this site is full of awesome tuts.
    Thanks m8.

  9. #18
    Join Date
    Sep 2009
    Location
    USA
    Posts
    3,400
    Blog Entries
    5
    Rep Power
    37

    Re: Reading and Writing Files in C

    You're welcome.
    Root Beer == System Administrator's Beer
    Download the new operating system programming kit! (some assembly required)

  10. #19
    Bouki is offline Newbie
    Join Date
    Apr 2010
    Posts
    20
    Rep Power
    0

    Re: Reading and Writing Files in C

    How can i store this record into a file call "record.txt"
    Code:
    struct student students[10]={ 
    {
    "123","Hall""Rayon""160687""43_Olympic_Court""898-0497""Computer"}, 
    {
    "234","Spencer""Sochelle""220587""29_Decent_Village""528-5214""Business"},          
    {
    "345","Dobson""Dwayne""890583""263_Far Park Blvd""457-2014""Computer"}, 
    {
    "456","Clarke""Dave""10181""87_Rasta_Village""354-5874""Law"}, 
    {
    "567","Currie""Nickeisha""230491""26_Waterground_rd""898-6578""Nurse"}, 
    {
    "678","Blackwood""Mariann""090490""3_St_Johns_road""256-1458""Art"}, 
    {
    "789","Hall""Wesley""101086""3_Bayfarm_road""236-1028""Science"}, 
    {
    "891","Hall""Bouki""251285""67_pimpim_drive""887-9910""Engineer"}, 
    {
    "912","Paul""Shawn""231180""25_glasco_Close""567-1996""Law"}, 
    {
    "101","Able""Frank""100591""1_Camp_road""528-1235""Business"}, 
    }; 
    I tried this function but it doest seems to work
    Code:
    void LoadStudents(Student students[]) 
    {    
      
    FILE *fp
      
    fp=fopen("records.txt","a+"); 


  11. #20
    Join Date
    Sep 2009
    Location
    USA
    Posts
    3,400
    Blog Entries
    5
    Rep Power
    37

    Re: Reading and Writing Files in C

    All that function does is open a file. You are going to have to write the members of the "students" struct to the file using the fprintf function.
    Root Beer == System Administrator's Beer
    Download the new operating system programming kit! (some assembly required)

+ Reply to Thread
Page 2 of 4 FirstFirst 1234 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. C# Tutorial: Reading and Writing XML Files
    By rueleonheart in forum CSharp Tutorials
    Replies: 3
    Last Post: 07-19-2011, 12:02 PM
  2. First writing and then reading, reopen ?
    By denarced in forum C and C++
    Replies: 2
    Last Post: 10-26-2010, 08:46 PM
  3. Object reading and writing...
    By lintwurm in forum Java Help
    Replies: 6
    Last Post: 03-11-2010, 01:26 PM
  4. Reading and writing files using File methods
    By ArekBulski in forum CSharp Tutorials
    Replies: 15
    Last Post: 10-10-2009, 10:02 AM
  5. Reading and writing files using FileStream class
    By ArekBulski in forum CSharp Tutorials
    Replies: 4
    Last Post: 09-06-2009, 03:53 AM

Tags for this Thread

Bookmarks

Posting Permissions

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