literal values in source code. fixed values that are directly inserted into memory

std::cout << "Hello world!";
int x { 5 };

now, if you do something like print a variable with a fixed value, that is not calling a fixed value anymore

int x {5};
std::count << x; // not a fixed value, passing a variable

because a variableā€™s value is stored in memory, and it can change due to debugging or vulnerabilities.

Literal Suffixes

like when you want 50f to be a float. They are suffixes you put to assign quick data-types to the literals.

Data typeSuffixMeaning
integralu or Uunsigned int
integrall or Llong
integralul, uL, Ul, UL, lu, lU, Lu, LUunsigned long
integralll or LLlong long
integralull, uLL, Ull, ULL, llu, llU, LLu, LLUunsigned long long
integralz or ZThe signed version of std::size_t (C++23)
integraluz, uZ, Uz, UZ, zu, zU, Zu, ZUstd::size_t (C++23)
floating pointf or Ffloat
floating pointl or Llong double
stringsstd::string
stringsvstd::string_view