Thread: basic input aouput program

  1. #1
    Registered User
    Join Date
    Oct 2003

    basic input aouput program

    I ma not able to generate code for the following program.can anyone assist me in writing the code
    Write a program in C++ that allows the input of names and ages from the key board and stores them , in characters, in a file titled persons.dat. After the input is finished , the program should print out what is in the file as well as the average age.

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    The edge of the known universe
    So break it down into smaller steps
    Step 1 - write a program which reads from the k/b and prints to the screen.

    At least try and demonstrate how far you can get by yourself, then we can best help you with the next step.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User major_small's Avatar
    Join Date
    May 2003
    i'm guessing you don't know file I/O too well or something... post what you have so we can see what you know...
    Join is in our Unofficial Cprog IRC channel
    Channel: #Tech

    Team Cprog Folding@Home: Team #43476
    Download it Here
    Detailed Stats Here
    More Detailed Stats
    52 Members so far, are YOU a member?
    Current team score: 1223226 (ranked 374 of 45152)

    The CBoard team is doing better than 99.16% of the other teams
    Top 5 Members: Xterria(518175), pianorain(118517), Bennet(64957), JaWiB(55610), alphaoide(44374)

    Last Updated on: Wed, 30 Aug, 2006 @ 2:30 PM EDT

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Program Plan
    By Programmer_P in forum C++ Programming
    Replies: 0
    Last Post: 05-11-2009, 01:42 AM
  2. Replies: 4
    Last Post: 04-03-2008, 09:07 PM
  3. Need some help with C program writing
    By The_PC_Gamer in forum C Programming
    Replies: 9
    Last Post: 02-12-2008, 09:12 PM
  4. Replies: 1
    Last Post: 08-11-2006, 05:44 AM
  5. completed a program; desire input
    By spirited in forum C++ Programming
    Replies: 2
    Last Post: 05-25-2003, 08:50 AM