| | |
problem at declaration
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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!
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!
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
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
•
•
Join Date: Nov 2008
Posts: 32
Reputation:
Solved Threads: 1
You can Make a Structure for these four identifiers.
I hope that i understood your Question
C Syntax (Toggle Plain Text)
struct AnyNameYouLike{ char* type_of_food; char* Name; char* Address; unsigned int Average_Cost; };
I hope that i understood your Question
Last edited by Ahmed_I; Feb 8th, 2009 at 8:37 am.
![]() |
Similar Threads
- Declare Global List problem (C++)
- Problem with objects having objects as attributes (C++)
- 'C' initializer problem (C)
- List <char *> Problem (C)
- float declaration problem (Java)
- Array declaration problem (C++)
- C++ cout statement (C++)
- Parse error, syntax error, Forbids declaration (C++)
- Memory buttons problem (Java)
Other Threads in the C Forum
- Previous Thread: question.
- Next Thread: A problem.
| Thread Tools | Search this Thread |
#include adobe api array arrays asterisks binarysearch calculate char cm copyimagefile copypdffile cprogramme creafecopyofanytypeoffileinc createcopyoffile csyntax database directory dynamic feet fflush fgets file fork forloop framework frequency getlasterror givemetehcodez global graphics gtkgcurlcompiling hacking hardware highest homework i/o include incrementoperators input interest kernel kilometer linked linkedlist linux linuxsegmentationfault list lists locate logical_drives loopinsideloop. match matrix meter microsoft motherboard mqqueue multi mysql number odf opensource owf pattern pdf performance pointer posix probleminc process program programming pyramidusingturboccodes radix read recursion recv repetition research scanf scheduling scripting segmentationfault sequential shape socket socketprograming stack standard string strings systemcall testing turboc unix user voidmain() wab windows.h





