C++ standard

I was just wondering what is the industry standard to write variables. I’m used to writing variables of the same kind in a line with coma separation.

e.g.
int windowWidth{300},windowHeight{400};

compared to:
int windowWidth{300};
int windowHeight{400};

What is more commonly used way within the industry? For me to straight away get some good practices for code writing.

C++ is used so widely that there isn’t a concrete standard that’s industry-wide. If you’re working on your own code, do what’s best for you. Otherwise, there’s usually some sort of guide on how you should be structuring your code.

For example: Coding Standard | Unreal Engine Documentation

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.