What's the most commonly used indentation in c++? And where can I find the rules for it and other coding conventions in C++?
What's the most commonly used indentation in c++? And where can I find the rules for it and other coding conventions in C++?
I suggest picking either a K&R variant or Allman style. The rules for these can easily be found by searching the Web. Also, read Stroustrup's answer to the FAQ: Which layout style is the best for my code?, especially the end.
Look up a C++ Reference and learn How To Ask Questions The Smart WayOriginally Posted by Bjarne Stroustrup (2000-10-14)
> What's the most commonly used indentation in c++?
It's a frequent topic of flame wars.
Indentation style - Wikipedia
I think the two basic rules being
1. Do it.
2. Be consistent.
> And where can I find the rules for it and other coding conventions in C++?
Try google.
coding conventions in C++ - Google Search
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.