I'm learning C++. For me, my programming style is just what looks the best; it doesn't seem to follow the rules of any one particular style. Here's an example
void f(int x){ //no space between close-paren and bracket
if (!x){
cout << "x is non-zero\n";
} //closing bracket indented to the same level as the original statement
}
It's only slightly different for something like a class or a namespace:
class myClass {}; //space between class name and bracket, otherwise the same as functions
K&R style does uses that kind of bracketing for statements, but my style uses it for everything. I'd like to know if there's a name for it so I can say simply what my indent style is without having to explain using examples like these.