I am learning C++ and I came to know that pointers if left uninitialized could point to random locations in memory and create problems that memory might be used by some othe
If the pointer is not used, the compiler will simply ignore it. Initializing it to NULL is the safe thing to do, imho.
Are you sure your not confusing with a function declaration? It's very common for a function to be declared as
char* do_something(const char* one,const char* two);
In this case, the pointers are used to specify what kind of argument you want to pass.