Q:

What is the correct way of initializing a smart pointer member variable?

I am currently learning up on smart pointers, and actually used them in my code as well. However, I wanted to reread the documentation on smart pointers and came across this line in MSDN (https://msdn.microsoft.com/de-de/library/hh279669.aspx):
// When initialization must be separate from declaration, e.g. class members, 
// initialize with nullptr to make your programming intent explicit.
shared_ptr<Song> sp5(nullptr);
//Equivalent to: shared_ptr<Song> sp5;

right now I am using this in my header file:
shared_ptr<Song> sp5 = NULL;

I tried it a few time now but I couldn't really get the MSDN example to work without a bunch of errors popping up, but when trying to find out the problem there is not really much in terms of resource which even tell me to initialize smart pointers like this.
Is it really necessary to solve it like MSDN suggested?

A:

No, it's not necessary. There's no "correct" way of initialising a smart pointer.
As the comment itself indicates, you may safely omit the initialiser.

A:

For a initializing I would just write.
shared_ptr<Song> sp5;

and then later assign a new pointer or use
sp5.reset(new Song());

Inizializing it with
shared_ptr<Song> sp5(nullptr);

works to show that you want the sharded_ptr to be null in the beginning.
But i personally would suggest to you, that when you deal with null shared_ptrs to check if they are null before using them. 
shared_ptr operator bool checks if the pointer is not null.
http://www.cplusplus.com/reference/memory/shared_ptr/operator%20bool/

