Tag: C++
All the articles with the tag "C++".
-
C++ Measure Execution Time with std::chrono (Beginner Guide)
Learn how to measure execution time in C++ with std::chrono. Time code in milliseconds or microseconds, time a function, and build a simple reusable timer.
-
C++ Multidimensional Array: 2D and 3D Arrays Explained
Learn C++ multidimensional arrays: how to declare, initialize, and loop over 2D and 3D arrays, pass them to functions, and when a vector is the better choice.
-
C++ Pass Vector to Function: By Reference, Value, or Const
Learn how to pass a vector to a function in C++ by value, by reference, and by const reference. Understand copies vs references and which to use, with examples.
-
C++ Sort Vector of Structs: By Field with std::sort
Learn how to sort a vector of structs in C++ using std::sort with a lambda comparator. Sort by any field, ascending or descending, and by multiple keys.