![]() |
|
#1
|
|||
|
|||
Array of StructuresWhat is wrong with this. The compiler returns
(expected `}' before '{' token ) (expected `,' or `;' before '{' token) CPP / C++ / C Code:
Last edited by admin : 18-Mar-2010 at 19:25.
Reason: Please insert your example C/C++ codes between [CPP] and [/CPP] tags
|
|||
|
#2
|
|||
|
|||
Re: Array of StructuresQuote:
Struct initializers are enclosed in braces, and the individual members are separated by commas. For your array, I'll put each element's initializer on a separate line. (Of course it doesn't make any difference to the compiler, but we mere humans sometimes benefit from clear delineations like this.) CPP / C++ / C Code:
Output: Code:
Regards, Dave Last edited by davekw7x : 17-Mar-2010 at 17:32.
|
|
#3
|
|||
|
|||
Re: Array of StructuresThanks alot Dave. Appreciate it alot
|
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| where is the problem and can you fix it (php) | oggie | MySQL / PHP Forum | 8 | 14-Apr-2008 15:08 |
| Getting a line error in register | oggie | MySQL / PHP Forum | 5 | 13-Apr-2008 16:16 |
| How Do I Create a Function that returns a usable array of pointers to structures? | UncleRic | C Programming Language | 2 | 03-Sep-2007 11:17 |
| Sort an array of structures | sassy99 | C Programming Language | 10 | 15-Feb-2007 07:46 |
| Need help deleting the last element in the array | headphone69 | C++ Forum | 2 | 15-Mar-2006 19:31 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The