Skip to main content
gamedev.net
🔒 Locked

problems with the code

Started by Bruce 0 replies 150+ views
Original Post
Bruce
Bruce
Hi David, I''ve seen two things in your code: 1. pointlist should be an array: Point* Largest(Point* pointlist[]) ... int n=sizeof pointlist[]/... ... if(pointlist... should be: if pointlist... five lines lower. 2. Largest is declared as getting a pointer as parameter and returning a parameter. Since pointlist is a pointer, you should return pointlist[max]; instead of return &pointlist[max];. Please don''t mind if I overlooked something, it''s some time ago since I''ve last seen C++ code. Yours Bruce

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.