Umm, you can use the same naming convention without using the same names Bar is, after all, both a noun and a verb, so could reasonably be defined as a class in one place and a function in another. By definition, const creates a constant that is a read-only reference to a value. Consequently, some naming conventions specify rules for the treatment of "compound" identifiers containing more than one word. But if you have more complicated expressions, or you are using less common operators e. In much the same way that you break pieces of thought into paragraphs in a writing class, do the same with code within a function. It's not like seeing String x lets me know that String is a class any more than string x. Some naming conventions limit whether letters may appear in uppercase or lowercase.
Consequently, using e.g. PascalCase for function names means you have to break the naming consistency in your project if you ever need to. However, please do not capitalize the first letter of variable names.
C++ Programming Style Conventions
Use two blank lines to separate function definitions, or class declarations. Use of a generic variable name such as x for reading in values (real numbers, say) to Here are some examples that illustrate our capitalization conventions.
It's a pretty minor problem, but should be known if you intend to use the preprocessor.
I think that's that, really, except for rules like "generally avoid single-letter name except for loop, template param, blah blah ", and "avoid using l, easily confused with 1" and "avoid uppercase O, easily confused with 0".
Video: C method names capitalize definition Capitalize - Uppercase Letters - Jack Hartmann, Capitalization
The capitalization convention has roots in C C is a compiled language. I also use const values or enums instead of manifest constants, further avoiding all upper case. In Gothe convention is to use MixedCaps or mixedCaps rather than underscores to write multiword names.
If they are an inline expansion of a function, the function is defined all in. Tangent: Go uses capitalization to determine visibility. Heck, at work, we use C ++, and I've seen method names that run the gamut (GetSize.
are all in the standard namespace, but ones that you define by yourself are not. General Naming Rules; File Names; Type Names; Variable Names. C++17), as well as the rare cases where code has a different meaning in that latest version.
When abbreviations or acronyms appear in such names, prefer to capitalize.
Do we intend to keep the variable name pointing at the same value throughout our program? Isn't it a vim convention to capitalize your own custom function names to distinguish them from the built in ones?
Style Guidelines for C++
Some dictate that they be lowercased e. However when I do, macros are made to look like functions when they can. It is possible to write names by simply concatenating words, and this is sometimes used, as in mypackage for Java package names,  though legibility suffers for longer terms, so usually some form of separation is used.