NewMeet CrodoTry it free on Mac →
Tips & Tricks7 min read

How to Type C++ Faster

Yash Rai
Yash Rai
Founder, TurboType
How to Type C++ Faster

In 150 C++ exercises, the colon is 4.1% of all characters - the highest frequency of any single symbol in any language we measured. Almost all of it is the scope operator: std::, Class::method, std::vector<int>::iterator. Two shifted presses on the weakest finger, hundreds of times a day.

1. C++ by the Numbers

26.2%
symbols
20.0%
Shift-key characters
14.3%
on the right pinky

Most frequent symbols

: 4.1% · ; 2.9% · ( ) 2.9% each · < 2.1% · . 1.3% · , 1.2% · { } 1.2% each · = 1.1%

Two things stand out against C. The colon jumps from negligible to first place, and the less-than sign appears at 2.1% - templates and stream output. Those two characters are what C++ adds to C's typing load, and they are both shifted, both right-handed.

Everything in the C guide still applies - semicolons, stars, ampersands, format strings if you use them. This post covers what C++ layers on top.

Keys that matter most for typing C++~`!1@2#3$4%5^6&7*8(9)0_-+=BkspTabQWERTYUIOP{[}]|\CapsASDFGHJKL:;"'EnterShiftZXCVBNM<,>.?/Shift
Highlighted: the :: colon, angle brackets, ampersand, star, braces, parentheses, and the = of ==/=>. The dashed line splits the hands - use the Shift on the opposite side from the key you are pressing. US QWERTY layout.

C++ ranks #3 of 8 for symbol share at 26.2%. The full comparison - all eight languages on symbols, Shift, right-pinky load, closing sequences, and doubled operators, with the method and its caveats - is in Hardest Programming Language to Type: Measured.

All finger and Shift-hand assignments in this guide assume a US QWERTY layout with standard touch-typing fingering; UK, German, French, and other layouts move several of these keys. “Right pinky” counts the keys that finger owns on US QWERTY: ; : ' " [ ] { } | / ? - _ = +.

2. The Double Colon

:: is Shift plus semicolon, twice, on the right pinky's home key. The common mistake is releasing and re-pressing Shift between the two, which either drops one colon or produces :;. Hold the left Shift through both presses. That single habit fixes most double-colon errors.

Learn std:: as a word

You will type std:: more than any other five-character sequence in C++. Three lowercase letters then two shifted colons, followed immediately by an unshifted name. Practise std::cout, std::string, std::vector, std::move until the Shift lands and releases without thought. The Strings & Streams chapter is saturated with them.

Out-of-class definitions are the long form: void Widget::render() const {. Class name, double colon, method, parens, a word, a brace - with a PascalCase capital at the start. Two different Shift hands within the first nine characters.

3. Angle Brackets: Templates and Streams

Angle brackets are Shift plus comma and Shift plus period - right middle and ring fingers. C++ uses them two ways that need different motions.

Templates

std::vector<std::pair<std::string, int>> - nested, with double colons inside. Hold Shift through stacked closers. The iterator form std::map<K, V>::iterator puts a >:: triple together: three shifted characters on two fingers. It is the hardest common sequence in the language.

Stream operators

std::cout << x << '\n'; - doubled chevrons, space-separated, repeating. Same key twice with Shift held, then release for the space. A stream line alternates Shift on and off every few characters, which is good rhythm practice once it stops being confusing.

4. Ampersands, Stars, and const

C++ adds references to C's pointers, so the ampersand does double duty: const std::string& name in a signature, &value for an address, && for an rvalue reference. The rvalue form is the shifted-7 key twice with Shift held, the same rule as the double colon.

const is one of the most-typed words in the language and it sits next to symbols constantly: const auto&, const T*, ) const {. Making const a single motion that flows into the following symbol is worth deliberate practice; the Functions and Best Practices chapters repeat it throughout.

5. Lambdas and the Bracket Soup

A C++ lambda opens with all three bracket types in a row: [&](int x) {. Square brackets (unshifted, right pinky), an ampersand (shifted, right index), parentheses (shifted, right ring and pinky), a brace (shifted, right pinky). Four Shift transitions in eight characters, all on the right hand.

Drill the capture-parameter-body opening as one phrase, then the algorithm shapes that wrap it: std::sort(v.begin(), v.end(), [](auto a, auto b) { return a < b; }); ends with ; }); - four right-pinky characters, two shifted. The Lambdas & Functional and Algorithms chapters are the densest practice on the site.

6. Common Mistakes

These are the errors that show up most in C++ practice runs. Each one has a specific mechanical cause, which means each one has a specific fix.

Releasing Shift between the two colons

std:: is the most-typed sequence in C++ and the most mistyped. Releasing Shift between the colons produces :; or a single colon. Hold the left Shift through both presses, then release for the name.

Re-pressing Shift through stacked angle closers

std::map> ends with >> and is often followed by ::. Three or four shifted characters in a row on adjacent fingers. One held Shift, several taps.

Typing the stream operator as two less-than signs

<< is one motion: Shift held, comma key twice. Typists who think of it as two separate characters pause in the middle and lose the cadence of the stream line.

Opening a lambda one bracket at a time

[&](int x) { is four bracket transitions in eight characters. Composing it character by character is slow and error-prone. Learn the capture-parameter-body opening as a phrase.

7. Pro Tips

  • Learn const as a word that flows into the following symbol: const auto&, const T*, ) const {. It is one of the most-typed tokens in the language.

  • Drill the ; }); close from algorithm calls. It is four right-pinky characters with two Shift transitions and it ends a large share of modern C++ statements.

  • When a line has both a double colon and an angle bracket - vector::iterator - practise the >:: triple in isolation before the full line.

8. A Two-Week Drill Plan

Days 1-4: Basics and Strings & Streams

std:: as a word. Shift held through both colons.

Start here: Basic Syntax · Strings & Streams

Days 5-7: Templates and Containers

Stacked angle closers, the >:: triple.

Start here: Templates · Containers & Utilities

Days 8-11: Lambdas and Algorithms

The three-bracket opening and the ; }); close.

Start here: Lambdas & Functional · Algorithms

Days 12-14: Memory and Modern C++

std::unique_ptr<T>, &&, structured bindings.

Start here: Memory Management · Modern C++ Features

Fifteen chapters on the C++ typing practice track. Baseline on the 60-second test in C++ mode.

9. Measuring Your Progress

A WPM number only means something against the right baseline. Our benchmarks guide puts code typing at roughly 55-70% of prose typing speed for the same person. C++ sits third from the top of the symbol-density ranking above, so expect the low end of that range.

C++ scores track C's closely, with the double colon and angle brackets shaving a few more WPM off. A snippet dense with std:: and templates will run measurably slower than one that is mostly control flow, so note which chapter a score came from.

What to watch in your C++ error log

  • The shifted characters that dominate C++: : ( ) < and the braces. These are the highest-frequency shifted symbols in the track, so they are where a wrong Shift hand shows up first. If your errors cluster on them, the fix is the Shift rule, not more general practice.

  • Closing sequences: C++ measures 335 closing runs per 100 snippets and 291 double colons - nearly three per snippet. Errors at the end of nested expressions are the tell; drill the closers as a unit rather than the openers.

For a routine that reliably shows improvement - three-run medians, 97% accuracy floor, weekly re-tests - see the benchmarks guide.

Most people see a measurable change inside three weeks at fifteen minutes a day. Speed often dips in the first few days as bad habits - usually a wrong Shift hand - get unlearned. That dip is the retraining working, not failing.

Conclusion

C++ adds two characters to C's load, and they are enough to make it feel like a different keyboard: the double colon and the angle bracket. Both are shifted, both right-handed, and both appear in doubled or stacked forms where the instinct to release Shift between presses causes most of the damage. Hold it. Learn std:: as a word. The rest of C++ is C with longer names.

Next Steps:

  1. Type std:: thirty times with Shift held through both colons. Count the misfires.
  2. Run three Templates exercises and note errors on >> and >::.
  3. Follow the plan, fifteen minutes a day.