problem at declaration

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Jan 2009
Posts: 29
Reputation: abby2589 is an unknown quantity at this point 
Solved Threads: 0
abby2589's Avatar
abby2589 abby2589 is offline Offline
Light Poster

problem at declaration

 
0
  #1
Feb 8th, 2009
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!
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 29
Reputation: abby2589 is an unknown quantity at this point 
Solved Threads: 0
abby2589's Avatar
abby2589 abby2589 is offline Offline
Light Poster

Re: problem at declaration

 
0
  #2
Feb 8th, 2009
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
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 29
Reputation: abby2589 is an unknown quantity at this point 
Solved Threads: 0
abby2589's Avatar
abby2589 abby2589 is offline Offline
Light Poster

Re: problem at declaration

 
0
  #3
Feb 8th, 2009
dont mind the ----
^_^
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 32
Reputation: Ahmed_I is an unknown quantity at this point 
Solved Threads: 1
Ahmed_I Ahmed_I is offline Offline
Light Poster

Re: problem at declaration

 
0
  #4
Feb 8th, 2009
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC