Thread: Extremely Basic c++ question?

  1. #1
    Registered User
    Join Date
    Feb 2006
    Posts
    27

    Extremely Basic c++ question?

    I have a bunch of names in a data file. One name, first and last, per line.

    How can I open up the file, read them, and then print them to the screen?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    What have you tried?
    My best code is written with the delete key.

  3. #3
    Registered User
    Join Date
    Feb 2006
    Posts
    27
    I'm kind of a newbie and I've been searching through my book and can't figure out how to do it.

  4. #4
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Basic question about GSL ODE func RK4
    By cosmich in forum Game Programming
    Replies: 1
    Last Post: 05-07-2007, 02:27 AM
  2. Basic question about RK4
    By cosmich in forum C++ Programming
    Replies: 0
    Last Post: 05-07-2007, 02:24 AM
  3. Visual Basic Question
    By Xeavor in forum Tech Board
    Replies: 5
    Last Post: 12-02-2004, 09:59 AM
  4. A very basic question
    By AshFooYoung in forum C Programming
    Replies: 8
    Last Post: 10-07-2001, 03:37 PM