naming pointers as 'pointerToXYZ'

c++, dereference, pointers

Solution

As for: "this is silly" it's pretty much upto you. In teams (/projects) there will likely be naming conventions which everyone agrees to. If you find this format a good naming convention for your own code then there's nobody stopping you.

Naming conventions for pointers that are commonly used aren't to common I think. One that I do see most often (as in consistent) is:

int *somenamePtr;

Problem

When I'm using pointers in my code, I don't always remember whether I'm dealing with pointers or the objects they point to. So, I want to call my pointers 'pointerToXYZ'. Do any of the official style guides (Links to official style guides) describe pointer naming conventions? UPDATE: Ok, I've made this a more concrete question; hopefully it can get reopened. If the answer is a simple "no" then I'll take it.

Original source

Related problems