![]() Functions and variables use lowerCamelCase: someMethod, someVariable.Types use UpperCamelCase: Point, SegTree.NamingĬ++ libraries use snake_case for functions and classes, in order to differentiate the user-defined code from the standard library, we will use CamelCase. For more information, check out "Read More" section. There are more debugging flags like -fsanitize=undefined which helps you eliminate bugs such as array out-of-range access and integer overflow during runtime. Use -Wall -Wextra -Wshadow flags for compilation, and try to eliminate all of the warning messages, this will prevent you from having some silly bugs. I'm planning to make some good stuff in the future following these principles! Stay tuned! Compiler I'm going to use this guide for myself and to teach my students. Don't overthink it, especially during a contest! You can integrate parts of it into your coding style. We just want to write our code correctly as fast as possible! Trying to hack people here on codeforces, I realized there is a need for a style guide! Our goal is to write correct, fast, clear and consistent code. There are many style guides for C++ out there, but we can't really use them as competitive programmers. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |