943,673 Members | Top Members by Rank

Ad:
  • C Discussion Thread
  • Unsolved
  • Views: 342
  • C RSS
Feb 8th, 2009
0

problem at declaration

Expand Post »
how can i declare this correctly:
because i always get an error like, too long declaration.

Type of food Name Address Average cost

Thai ABC Makati 250
American DEF Pasay 350
Asian GHI Manila 150
Thai JKL Muntinlupa 300
Thai MNO Paranaque 350
American PQR Manila 200
Asian STU Makati 400
Asian VWX Roxas blvd. 500
American YZA Manila 250

it should be printed out already in the program. tnx!
Similar Threads
Reputation Points: 8
Solved Threads: 0
Light Poster
abby2589 is offline Offline
33 posts
since Jan 2009
Feb 8th, 2009
0

Re: problem at declaration

Type of food-- Name--Address-- Average cost

Thai ------------ABC---- Makati---- 250
American--------DEF ----Pasay ------350
Asian------------GHI ----Manila ------150
Thai--------------JKL-----Muntinlupa--300
Thai--------------MNO---Paranaque--350
American------- PQR ---Manila -------200
Asian------------STU ----Makati ------400
Asian -----------VWX ---Roxas blvd.--500
American-------YZA-----Manila--------250
Reputation Points: 8
Solved Threads: 0
Light Poster
abby2589 is offline Offline
33 posts
since Jan 2009
Feb 8th, 2009
0

Re: problem at declaration

dont mind the ----
^_^
Reputation Points: 8
Solved Threads: 0
Light Poster
abby2589 is offline Offline
33 posts
since Jan 2009
Feb 8th, 2009
0

Re: problem at declaration

You can Make a Structure for these four identifiers.

  1. struct AnyNameYouLike{
  2. char* type_of_food;
  3. char* Name;
  4. char* Address;
  5. unsigned int Average_Cost;
  6. };

I hope that i understood your Question
Last edited by Ahmed_I; Feb 8th, 2009 at 8:37 am.
Reputation Points: 14
Solved Threads: 1
Light Poster
Ahmed_I is offline Offline
32 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C Forum Timeline: question.
Next Thread in C Forum Timeline: A problem.





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC