| closed account (GzwqM4Gy) | |
|
Hi everyone! I'm new here (and a C++ beginner), and by that I would like to ask a simple first question; when naming variables and functions, is it better to begin with a lowercase letter than a uppercase letter? - In C#, I've heard that it is better to name a variable with a lowercase letter in the beginning, like newCar. | |
|
|
|
| Peter87 (3691) | |
|
There are many different naming conventions. Only you can tell which one to use based on your personal preference, what you are used to, etc. If you work in a team, do as the others do. Personally I always start function and variable names with lower case letter. Upper case letters I use for types. | |
|
Last edited on
|
|
| EddieV223 (15) | |
|
A good nameing convention is as follows class MyClass void MyClass::MyFunc(); MyClass myLocalVar; myLocalVar.MyFunc(); | |
|
Last edited on
|
|
| Zephilinox (548) | |||
I do it this way
| |||
|
Last edited on
|
|||
| closed account (GzwqM4Gy) | |
| Thanks a lot! :) | |
|
|
|
| Framework (3116) | |
|
Beware! Identifiers that contain 2 consecutive underscores are reserved for the implementation, and identifiers that end in "_t" are reserved for Unix implementations. In addition, identifiers that begin with a single underscore are reserved for library implementations. Wazzak | |
|
|
|