1/20
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
std::stoi and std::atoi|||std::stoi converts a string to an integer and throws an exception if conversion fails. std::atoi converts a string to an integer but returns 0 if conversion fails, with no error handling.
VLA|||VLA (Variable Length Array) is an array whose size is determined at runtime rather than compile time. While supported in C99, they are not standard in C++, though some compilers allow them as an extension.
Networking in Linux|||Linux networking involves using sockets (created with socket()), binding them to addresses, listening for connections, and using system calls like send() and recv() to transmit data. Key protocols include TCP/IP and UDP.
GCC|||GCC (GNU Compiler Collection) is a free, open-source compiler that compiles C, C++, and other languages. It's widely used in Linux environments and is the default compiler on many systems.
std::erase|||std::erase removes elements from a container. For strings, it removes characters at a specified position or range. For vectors and other containers, it removes elements by iterator or value.
Initializer List|||An initializer list is a standard library feature (std::initializer_list) that allows constructors and functions to accept a variable number of arguments of the same type using brace initialization syntax {}.
Data Member|||A data member is a variable that belongs to a class or struct and stores data for each instance of that class. Also called a member variable or field.
First Member Initialized|||In C++, the first member of a class is the first one listed in the class definition. Member initialization order follows declaration order, not the order in the initializer list.
BENCHMARK Keyword|||The BENCHMARK keyword (from Google Benchmark library) is used to define and run performance benchmarks. It measures the execution time of code snippets.
consteval|||consteval is a C++20 keyword that specifies a function must be evaluated at compile time. If it cannot be evaluated at compile time, it results in a compiler error.
using|||using is a C++ keyword that has multiple purposes: it can introduce a namespace (using namespace std;), create type aliases (using MyInt = int;), or bring individual names from a namespace into scope (using std::cout;).
typedef|||typedef is a keyword used to create an alias for an existing type. For example, typedef unsigned int uint; creates an alias for unsigned int.
C++'s Most Vexing Parse|||The most vexing parse is a quirk where C++ interprets certain declarations ambiguously. For example, Foo bar(); is parsed as a function declaration rather than a variable declaration, which surprises many programmers.
Weak vs noexcept vs none vs basic|||Exception safety levels: weak (operations may fail and leave data in an intermediate state), noexcept (no exceptions thrown), none (no guarantees), and basic (if an exception occurs, the object remains in a valid state).
Four Guarantees of Exception Safety|||The four levels of exception safety are: no-throw guarantee, strong guarantee (all or nothing), weak guarantee (object in valid but unspecified state), and basic guarantee (minimal safety).
Four Categories of Storage Duration in C++|||The four storage durations are: automatic (function scope), static (program lifetime), dynamic (heap, manual lifetime), and thread-local (thread lifetime).
Nested Namespaces|||Nested namespaces are namespaces defined inside other namespaces, creating a hierarchical organization of names. Accessed using the scope resolution operator :: (e.g., OuterNamespace::InnerNamespace::name).
memset|||memset is a C standard library function that fills a memory area with a specified byte value. Often used to initialize memory blocks, though it's generally considered unsafe in modern C++ in favor of constructors.
Logical Operators and Sequencing|||Logical operators && (AND) and || (OR) introduce sequencing guarantees: they evaluate left-to-right and short-circuit (stop evaluating once the result is determined). The comma operator also introduces sequencing.
Sequencing|||Sequencing defines the order in which operations are evaluated in C++. It ensures that certain operations happen before others, preventing undefined behavior from operations on the same variable without intervening sequencing points.
Shared Pointer Control Blocks|||Shared pointer control blocks are internal data structures that manage reference counts and deletion callbacks for shared_ptr objects. Multiple shared_ptrs to the same object share one control block to track how many pointers reference the object.