Not realy a technical issue, but a mate has a lad (Robert) learning directx with C and C++ he has a project to draw a 4 sided pyramid (which works) but his solutionis smart enough to take user input for the number of sides.
Can anybody propose what may be occuring given the following.
Run the program
Robert inputs a 3
The program draws a pyramid with a 3 sided base
All is well, Hurrah
Run the program
Robert inputs a 6
The program draws a pyramid with a 6 sided base
All is well, Hurrah
Run the program
Robert inputs a 7
The program draws a pyramid with a 7 sided base
All is well, Hurrah
Run the program
Robert inputs an 8 (or more)
The program crashes reporting a memory error
Oh Dear.
Can anybody propose what may be occuring given the following.
Run the program
Robert inputs a 3
The program draws a pyramid with a 3 sided base
All is well, Hurrah
Run the program
Robert inputs a 6
The program draws a pyramid with a 6 sided base
All is well, Hurrah
Run the program
Robert inputs a 7
The program draws a pyramid with a 7 sided base
All is well, Hurrah
Run the program
Robert inputs an 8 (or more)
The program crashes reporting a memory error
Oh Dear.
Comment