why i can construct a string with an empty char* in C++?

In C++, why the following code has run time error? could someone explain this for me?

char* p = NULL; 
string str(p); 

I tried this in VS2013 and codeblocks, but both got an run time error. i do not kown why

Source: c++

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.