Never written a single line of web development code in my life. Have written plenty of C++ however.
Yes, at times it was the only option, but that holds less true everyday. Primary reason anyone would use C++ today is because of legacy reasons. Otherwise use D, Rust, Swift, Go, C# or even Java. You could probably use OCaml as well. Even Objective-C would likely be a better choice.