C++ Typing Speed Test
Modern C++ prefixes half its vocabulary with `std::` and nests templates inside templates. If `std::vector<std::pair<int, std::string>>` makes your fingers seize up, these drills will fix that.
Namespace Prefixes and Template Nesting
The `std::` prefix β five characters including a doubled shifted colon β precedes nearly every standard library name, making it the most repeated chunk in modern C++. Template angle brackets nest deeply (`std::map<std::string, std::vector<int>>`), and the closing `>>` sequence demands precise Shift-period double-strikes. Scope resolution (`::`), member access (`.` and `->`), and stream operators (`<<`, `>>`) each add doubled-symbol patterns.
C++11 onward layered in lambdas (`[](const auto& x) { ... }`), which open with a bracket pair in a position no other construct uses, plus `&` and `*` inherited from C. Smart pointers wrap types in more angle brackets (`std::make_unique<HttpServer>(8080)`). Drilling real STL and RAII code builds tolerance for the language's unmatched symbol density.
Key Drills for C++:
- std:: as one chunk: Type the namespace prefix as a single five-key burst. Hesitating on `::` doubles your cost on every line.
- Close your templates: Nested generics end in `>>` or `>>>`. Drill consecutive Shift-period strikes without releasing rhythm.
- Lambda openers: The `[](` sequence is unique to lambdas. Chunk bracket-bracket-paren so closures start instantly.
Sample Drill: Vectors & Range Loops
STL vector with emplace_back and range-based iteration.
std::vector<std::string> names;
names.emplace_back("Ada");
names.emplace_back("Linus");
for (const auto& name : names) {
std::cout << name << '\n';
}The Symbols That Slow You Down
The keystrokes below are where C++ typing speed is won or lost. Key positions shown for QWERTY β the pattern transfers to any layout, just on different physical keys.
| Symbol | Used For | Keys | How to Drill It |
|---|---|---|---|
| std:: | Namespace prefix | s-t-d, then Shift+Semicolon twice | The most repeated five-key chunk in modern C++. Type it as one memorized burst: letters, symbol, symbol. |
| << | Stream insert | Shift+Comma twice | Output chains repeat it dozens of times. Two even Shift-comma strikes without releasing rhythm. |
| >> | Stream extract / closer | Shift+Period twice | Doubled in both input chains and closing nested templates (`vector<vector<int>>`). |
| <> | Template brackets | < as Shift+Comma, > as Shift+Period | Every STL container wraps its type. `std::map<std::string, int>` is the full workout. |
| []( | Lambda opener | Shift+[, Shift+], Shift+9 | The unique lambda signature. Chunk bracket-bracket-paren as one gesture so closures start instantly. |
| & / * | References / pointers | Shift+7 / Shift+8 | Inherited from C and everywhere in signatures: `const auto&`, `int*`. Both reaches must be free. |
Common C++ Typing Mistakes
- βSlowing down inside deep template nesting β practice `std::unordered_map<std::string, std::vector<int>>` as one drill.
- βForgetting the closing bracket when templates nest three deep β closers arrive in `>>` and `>>>` bursts.
- βTyping `.` where `->` belongs on iterator access β both live in your hands; train the switch deliberately.
What's a Good C++ Typing Speed?
Modern C++ is the most symbol-dense mainstream language: 20β35 WPM is normal working speed, and 40+ WPM with 95%+ accuracy is excellent. Anything starting with `std::` should cost you no more attention than a common word.