| | |
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.
Views: 254 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for C
* adobe api append array arrays bash binarysearch char character cm copyanyfile copypdffile createcopyoffile createprocess() csyntax directory drawing dynamic executable execv feet fgets file floatingpointvalidation fork frequency function getlogicaldrivestrin givemetehcodez global graphics gtkgcurlcompiling gtkwinlinux highest homework i/o ide infiniteloop initialization interest intmain() iso keyboard kilometer lazy license linked linkedlist linux list lowest matrix meter microsoft mqqueue multi mysql oddnumber odf open openwebfoundation overwrite pause pdf pointer pointers posix power program programming pyramidusingturboccodes read recursion recv recvblocked repetition reversing scheduling segmentationfault send single socketprogramming spoonfeeding stack standard strchr string student suggestions system test testautomation unix urboc user whythiscodecausesegmentationfault win32 win32api windows.h





