Thread: b_file Question

  1. #1
    Registered User
    Join Date
    Apr 2004
    Posts
    14

    b_file Question

    Hi all,

    I'm following tutorial ten, and all the code there works. However, I want to display either something other than the first word of a string in a file, or more than one word. I'm not quite sure how to do this using b_file, would anyone be kind enough to help?

    Thanks very much,
    Mike

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    You can read more than one word using getline:
    Code:
    b_file.getline ( str, sizeof str );
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Apr 2004
    Posts
    14
    Thanks, does what I wanted

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Alice....
    By Lurker in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 06-20-2005, 02:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 05:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 12:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 09:47 PM
  5. Question, question!
    By oskilian in forum A Brief History of Cprogramming.com
    Replies: 5
    Last Post: 12-24-2001, 01:47 AM