Skip to main content

Practice · 2 of 3

Borrow, don't copy

CHALLENGE
Difficulty: intermediate+25 XP

Implement int count_vowels(const std::string& text) taking the string by const& (no copy) and returning the number of vowels a e i o u (case-insensitive).

Back to lesson: Practice: References: borrow and write through