Best for
Compiled engineering tools
Use C++ for performance-sensitive numerical code, simulation kernels, device interfaces, and reusable libraries.
Programming reference
Search C++ syntax, standard library functions, containers, algorithms, and engineering programming patterns with concise examples.
Syntax lookup
Filter by function, library, container, programming task, or example syntax.
Best for
Use C++ for performance-sensitive numerical code, simulation kernels, device interfaces, and reusable libraries.
Watch out
Check integer division, memory ownership, references, const-correctness, and compiler warnings.
Searchable reference
| Category | Command / Function | Purpose | Example / Use |
|---|---|---|---|
| Headers | #include | Import declarations from standard or project headers | #include <vector> |
| I/O | std::cout | Write text or values to standard output | std::cout << value << "\n"; |
| Math | std::sqrt | Compute square root from <cmath> | double r = std::sqrt(area / pi); |
| Containers | std::vector | Store a dynamic sequence of values | std::vector<double> x{1.0,2.0}; |
| Containers | std::array | Store fixed-size arrays | std::array<double,3> p{}; |
| Algorithms | std::sort | Sort values in a range | std::sort(v.begin(), v.end()); |
| Algorithms | std::accumulate | Sum or reduce values | std::accumulate(v.begin(), v.end(), 0.0) |
| Files | std::ifstream | Read data from a file | std::ifstream file("data.csv"); |
| Functions | return | Return a value from a function | double area(double d) { return pi*d*d/4; } |
| Classes | class | Define a custom type with data and behavior | class Beam { public: double length; }; |
| Control | for | Loop over a range of values | for (double x : values) { sum += x; } |
| Build | g++ | Compile a simple C++ source file | g++ main.cpp -std=c++20 -O2 |
How to use
task -> command -> example
Start with the task you need, then check the command, function, or shortcut syntax before using it in a real workflow.
version + module + units
Software behavior can change by version, workspace, add-in, toolbox, shell, or engineering unit system.
example -> small test -> real work
Use the examples as starting patterns and confirm results with a small test file, sample model, or known calculation.
inputs + method + result
Record the inputs, method, version, and assumptions so engineering results can be reviewed later.
Workflow notes
A file included with #include that declares functions, types, templates, and library interfaces.
A standard library data structure such as vector, array, map, set, or unordered_map.
An alias to an existing object, often used to avoid copying and to express ownership intent.
A generic function or class pattern instantiated for specific types at compile time.
FAQ
Search by command, function, shortcut, task, or example, then adapt the pattern to your drawing, model, code, spreadsheet, or simulation workflow.
Use them as quick reference patterns. Validate syntax, units, versions, and outputs before using the result in production engineering work.
Search is faster than scanning long documentation when you know the task but need the exact command, function, or syntax reminder.
Related
AutoCAD command reference for drafting and modeling.
Excel functions and shortcuts for engineering work.
LaTeX command reference for technical documents.
Linux command reference for engineering workflows.
MATLAB functions for engineering and numerical analysis.
OpenFOAM command and function reference.
Python references for engineering calculations and workflows.
SolidWorks keyboard shortcuts and workflow reference.
Tell us what would make EngLab more useful for your engineering work.