b_file Question

This is a discussion on b_file Question within the C++ Programming forums, part of the General Programming Boards category; Hi all, I'm following tutorial ten, and all the code there works. However, I want to display either something other ...

  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,796
    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, 03:51 PM
  2. Debugging question
    By o_0 in forum C Programming
    Replies: 9
    Last Post: 10-10-2004, 06:51 PM
  3. Question about pointers #2
    By maxhavoc in forum C++ Programming
    Replies: 28
    Last Post: 06-21-2004, 01:52 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21