Talk:Straddling checkerboard: Difference between revisions

Content added Content deleted
No edit summary
Line 41: Line 41:
: When I comment out the #include line for algorithm, and compile with GCC's `g++` command, I see no change in behavior. --[[User:Util|Util]] 15:32, 9 June 2011 (UTC)
: When I comment out the #include line for algorithm, and compile with GCC's `g++` command, I see no change in behavior. --[[User:Util|Util]] 15:32, 9 June 2011 (UTC)
:: K. No point in including extra files then. [[User:MagiMaster|MagiMaster]] 18:15, 9 June 2011 (UTC)
:: K. No point in including extra files then. [[User:MagiMaster|MagiMaster]] 18:15, 9 June 2011 (UTC)
::: In C and C++, removing headers and seeing if it compiles is ''never'' a good way to determine if a header is needed. It is very likely that your compiler's version of some other header you included (or some header it included, etc.) happen to have included <algorithm>, but it is possible that some other implementation of those same headers won't. To make your code portable you should always make sure to include the right headers for all the functions you use, from the language standard. min and max are defined in the <algorithm> header in section 25 (Algorithms library) of the C++ standard. --[[User:Spoon!|Spoon!]] 20:02, 9 June 2011 (UTC)


==Rename?==
==Rename?==