Skip to content
AgileLogics
2 min read

Comments & Code Style

Prerequisites: typedef

// A single-line comment

/*
 * A multi-line comment
 */

Convention: snake_case for variables and functions (unlike Java's camelCase), UPPER_SNAKE_CASE for #define constants, and a header guard (#ifndef FOO_H / #define FOO_H / #endif) at the top of every header file to prevent it being included twice.