Jul 9, 2024
int main() {}
); returns 0 for success.#include <iostream>
for printing to the screen using std::cout
.int fileSize = 100;
int
, double
, float
, char
, bool
const
keyword, e.g., const double PI = 3.14;
file_size
), Pascal case (FileSize
), Camel case (fileSize
). Use Camel case for variables and Pascal case for classes.+
), Subtraction (-
), Multiplication (*
), Division (/
), Modulus (%
), Increment (++
), Decrement (--
).std::cout
for writing to console.std::cin
for reading from the console.cmath
library for functions like floor
, pow
.rand
, seeding random generator with srand
.srand(time(nullptr))
.int
, short
, long
, float
, double
, char
, bool
int number{1.2};
causes an error, int number{};
initializes to zero.