NO

Author Topic: input and arrays  (Read 3206 times)

meta

  • Guest
input and arrays
« on: October 21, 2004, 12:28:28 AM »
Hi all how are you
I bumped ito a problem. I wrote a program that requiers the user to enter their name, age, telephone number and city they live in. But i want to save all of those information into an array and i have no idea of how to do that.The array should automatically display the tohe information. I would be very greatfull for any help.

JohnF

  • Guest
Re: input and arrays
« Reply #1 on: October 21, 2004, 07:42:41 AM »
Quote from: "meta"
Hi all how are you
I bumped ito a problem. I wrote a program that requiers the user to enter their name, age, telephone number and city they live in. But i want to save all of those information into an array and i have no idea of how to do that.The array should automatically display the tohe information. I would be very greatfull for any help.


This question should have been posted to the 'Newbie questions' section!

What have you done so far?

It would be better to save the info into a structure.

Code: [Select]

typedef struct info
{
    char name[50];
    char city[50];
    // etc.
}


Are you writing a console app or windows app?

John