From af7711af0d634c0b3e8a9d81905c7f847cfb1c2b Mon Sep 17 00:00:00 2001 From: Lucas Rufkahr Date: Wed, 25 Feb 2026 14:32:57 -0600 Subject: [PATCH] a --- notes/cpp.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/notes/cpp.php b/notes/cpp.php index 425c08e..ae36c54 100644 --- a/notes/cpp.php +++ b/notes/cpp.php @@ -23,6 +23,9 @@
  • Ternary Operator
  • Other Topics
  • +

    Basics

    @@ -335,7 +338,16 @@
    x = (a > b) ? 1 : 0;
    This means that if a is greater than b, assign x with 1. If a is not greater than b, assign x with 0. The ternary operator however needs the values in the if and else part to be of the same type. If they are not, the program will fail to compile.

    +

    id="functions">

    +

    + A function is a wrapper to easily reuse code and improve readability of your program. The function signature contains the return type, the identifier of the function, and the parameters that the function requires. The function contains statements within the curly braces. Finally, the function returns a value which has a type indicated in the function signature. +

    type name (parameters) {...}
    +

    Other Topics

    +

    String Manipulation

    +

    + ... +