... | ... | @@ -11,10 +11,10 @@ |
|
|
<li>
|
|
|
```cpp
|
|
|
// local 2D Vector of doubles
|
|
|
using std::vector<std::vector<double>> = vDouble2D;
|
|
|
using std::vector<std::vector<double>> = vDouble2D;
|
|
|
```
|
|
|
</li>
|
|
|
</ul>
|
|
|
</li>
|
|
|
</ul>
|
|
|
|
|
|
<li><strong>Avoid underscores:</strong> adds unnecessary length to the variable name, especially when combined with STL container types, and could conflict with name mangling. Reserve it for prefix of special cases (see class members and lambda functions). Use upper case letters instead.<ul><li><code>Don't</code><pre style="border: 0;"><code> std::vector < std::vector < < double > > <strong>this_is_my_very_very_long_two_dimensional_vector_name;</strong> </code></pre></li><li><code>Do</code> <pre style="border: 0;"><code> std::vector < std::vector < < double > > <strong>thisIsMyVeryVeryLongTwoDimensionalVectorName;</strong> </code></pre></li></ul></li><li>
|
|
|
|
... | ... | |