diff --git a/content/1_Intro/Code_Conventions.mdx b/content/1_Intro/Code_Conventions.mdx index b73d90b..41fc869 100644 --- a/content/1_Intro/Code_Conventions.mdx +++ b/content/1_Intro/Code_Conventions.mdx @@ -2,7 +2,7 @@ id: code-con title: Code Conventions author: Nathan Wang, Benjamin Qi, Michael Cao -description: "?" +description: "The conventions that this guide uses" prerequisites: - expected - modules @@ -10,7 +10,20 @@ prerequisites: The code we provide should follow the conventions below. Please note that you do _not_ have to copy our conventions; there is no "right" convention for coding! -Everything should compile assuming that the templates below are included. If any code does not compile or is hard to read, submit a complaint using the "Contact Us" button. +If any code does not compile or is hard to read, submit a complaint using the "Contact Us" button. + + + + +If you find unrecognizable symbols or functions in `C++` code, note the template below! Everything should compile assuming that the template below is included. + + + + + + + + ## General @@ -72,14 +85,14 @@ else - Use `true / false` for boolean values, not `1 / 0`. - Explain the use of any not well known standard library functions with comments that haven't been introduced before like `__builtin_ffs()` or `tie(a, b, c)` in C++. -## Template - -The template is assumed to be in every code file. The word "template" usually refers to a C++ template as C++ templates can generally take advantange of more powerful features and be more customized by each competitor. Don't be afraid to write your own template! (Though the USACO Guide will assume the use of the following template) - +## Template + +The "template" refers to code that is assumed to be in every file. The word "template" usually refers to a C++ template as C++ templates can generally take advantange of more powerful features and be more customized by each competitor. Don't be afraid to write your own template! The USACO Guide will assume the use of the following template in any C++ Code: + See [C++ Tips & Tricks](./cpp-tips). ```cpp