![]() |
|
#1
|
|||
|
|||
problem with arraysI have to write a program with arrays, and I don't understand it very well, if there is somebody that can help me, I'll be glad to send the code, to have it checked
|
|
#2
|
||||
|
||||
|
Just post your code or attach your files and we'll see what we can do for you
Kind regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#3
|
|||
|
|||
here is the codethere is a fatal error
|
|
#4
|
||||
|
||||
|
Quote:
CPP / C++ / C Code:
Your array has a length of NUM_PRIMES (0,..., NUM_PRIMES -1). You can't access p[NUM_PRIMES]: CPP / C++ / C Code:
May I also say I don't really follow your logic? CPP / C++ / C Code:
What would i be here? You don't assign it a value... Also, what is this line suppose to do? (in the same function) CPP / C++ / C Code:
I see you pass NUM_PRIMES as the second argument... Maybe you should give it a second thought, huh? :-D Best regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
|
#5
|
|||
|
|||
problemLuci I'm sorry I did not explain myself, here is what I'm supposed to do: (see attachment)
thanks, David |
|
#6
|
||||
|
||||
|
Ok, but this doesn't change anything.... The mistake(s) I pointed out is obvious: you pass the length of your array and that causes the fatal error.
Maybe I wasn't to clear Kind regards, Luci __________________
Please read these Guidelines before posting on the forum "A person who never made a mistake never tried anything new." Einstein |
Recent GIDBlog
Toyota - 2008 August Promotion by Nihal
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Knight tour (arrays help needed) | dilmv | C++ Forum | 7 | 18-Oct-2004 14:31 |
| Mother board problem | mrkamran | Computer Hardware Forum | 2 | 07-Oct-2004 10:31 |
| Mpeg2 SVCD disc problem | mrnobody | Computer Software Forum - Windows | 0 | 13-Aug-2004 08:51 |
| Another FX 5600 problem (but with details that might shed light on this) | BobDaDuck | Computer Hardware Forum | 2 | 16-Apr-2004 07:53 |
| folder problem in trees | zuzupus | MySQL / PHP Forum | 23 | 26-Sep-2003 07:32 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The