Pelles C forum

Pelles C => General discussions => Topic started by: meta on October 21, 2004, 12:28:28 AM

Title: input and arrays
Post by: meta 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.
Title: Re: input and arrays
Post by: JohnF 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.


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


Are you writing a console app or windows app?

John