Default pointer value in Visual C ++ 6.0
Undefined.
C ++ does not define a default for uninitialized pointers.
If you run debugging with visual studio then the initial value of uninitialized variables is sometimes something like 0xcdcdcdcd. This value changes depending on whether the variable is on the stack or on the heap. This is, however, not true in release builds, and you should not rely on it in any way.
Here's more information about these values.
source to share
It's undefined. And even if VC ++ 6.0 is absolutely guaranteed to use a certain value, it will still be undefined by the C ++ standard. You should always avoid special compiler functions. You may not feel like you need to move the code to another compiler, but sooner or later you will and it will break.
And it's so hard to say:
double* myArray = NULL;
There is no default pointer value in Visual C ++. If not declared, the pointer is not initialized, so the value will be undefined (which means garbage). Therefore, it is recommended as a best practice to initialize pointers at declaration (or in the constructor initialization list for class pointer members).
source to share
A pointer is determined at run time to occupy some specific place in memory. Its initial value will be determined by whatever bit pattern happens to be at that location. It is impossible to define it in advance.
As stated elsewhere, declare it with an initial value of null, or in whatever way you like.
source to share