![]() |
|
#1
|
|||
|
|||
Assigning an object to an element of an indexed listI'm lost again in the whole interaction between main, a "candidate" class, and an "Indexed LIst" template class. In the indexed list, I'm trying to assign the values from an object of type candidate to an element of an array. My compiler doesn't like this and tells me:
Quote:
main: CPP / C++ / C Code:
CPP / C++ / C Code:
CPP / C++ / C Code:
CPP / C++ / C Code:
|
|||
|
#2
|
|||
|
|||
Re: assigning an object to an element of an indexed listHi - your problem is that there is nothing in your code to set/change the size of elements[] (to specify the number of pointers that are held within elements[]). If you want to 'grow' the array then you have to tell it so.
CPP / C++ / C Code:
__________________
Michael Dual Opteron 280 (2 x dual core) with 2Gb RAM, 2x36GB system drives, 2T on 3Ware 9500Mi RAID controller. Running Fedora Core 4. Using Anjuta IDE. Developemnt in C++ with MySQL (via mysql++). |
Recent GIDBlog
Once again, no time for hobbies by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| [Include] Doubly-linked List | dsmith | C Programming Language | 6 | 14-Apr-2006 14:12 |
| Help in C Print is not working with LinkList | batman3280 | C Programming Language | 3 | 09-Mar-2006 20:03 |
| linked list error message | Krandygrl00 | C++ Forum | 4 | 22-Jun-2005 15:13 |
| search linked list | itsmecathys | C++ Forum | 20 | 18-Apr-2005 02:34 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The