Computer Science Canada Need help regarding a program |
Author: | A.J [ Fri Feb 22, 2008 1:19 pm ] | ||
Post subject: | Need help regarding a program | ||
I am new to C++, so I needed help regarding why this program always crashes:
|
Author: | Saad [ Fri Feb 22, 2008 1:54 pm ] | ||
Post subject: | RE:Need help regarding a program | ||
Woah there,
However if you made a global, the memory are assigned before the program starts and don't use the stack. |
Author: | wtd [ Fri Feb 22, 2008 2:03 pm ] |
Post subject: | RE:Need help regarding a program |
Or just dynamically allocate it. |
Author: | A.J [ Fri Feb 22, 2008 2:21 pm ] |
Post subject: | Re: Need help regarding a program |
and how do i do that? |
Author: | Tony [ Fri Feb 22, 2008 2:31 pm ] |
Post subject: | RE:Need help regarding a program |
malloc |
Author: | Saad [ Fri Feb 22, 2008 2:37 pm ] |
Post subject: | Re: RE:Need help regarding a program |
Tony @ Fri Feb 22, 2008 2:31 pm wrote: malloc
Err, for C++ you should use new and delete |
Author: | wtd [ Fri Feb 22, 2008 2:48 pm ] |
Post subject: | RE:Need help regarding a program |
Additional note, use a constant for 9999999, instead of magic numbers. |
Author: | OneOffDriveByPoster [ Fri Feb 22, 2008 4:34 pm ] | ||
Post subject: | Re: Need help regarding a program | ||
A.J @ Fri Feb 22, 2008 1:19 pm wrote:
|
Author: | A.J [ Fri Feb 22, 2008 9:13 pm ] | ||
Post subject: | Re: Need help regarding a program | ||
thx for your help guys!!! sooooo..................... can you help me with this program?
|
Author: | OneOffDriveByPoster [ Fri Feb 22, 2008 9:23 pm ] | ||
Post subject: | Re: Need help regarding a program | ||
A.J @ Fri Feb 22, 2008 9:13 pm wrote:
|
Author: | A.J [ Sat Feb 23, 2008 12:51 am ] |
Post subject: | Re: Need help regarding a program |
well, this was #53 on project euler. it doesn't matter, I finished it in turing (using pascal's triangle) thanks for helping |