If you use a well-known code style like, for example, LLVM, Google, or Stroustrup, you can copy the code style settings from it. Go to Settings/Preferences | Editor | Code Style | C/C++ and click Set from... | Predefined Style.