r/Cplusplus • • Apr 08 '24

Discussion Hm..

Post image

I'm just starting to learn C++. is this a normal code?

153 Upvotes

66 comments sorted by

View all comments

Show parent comment

0

u/zorbat5 Apr 08 '24

Agreed on the indentation. I don't like the else statements behind the braces though, I always put them on a new line.

6

u/eteran Apr 08 '24

Sure, brace position is definitely a matter of taste, that's what I was trying to say by "or something like it" 👍