News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

input and arrays

Started by meta, October 21, 2004, 12:28:28 AM

Previous topic - Next topic

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.

JohnF

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.


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


Are you writing a console app or windows app?

John