#include <iostream> #include <string> using namespace std; int main() { std::string str(NULL); cout << '{' << str << '}' << endl; return 0; }
Standard input is empty
Standard output is empty
terminate called after throwing an instance of 'std::logic_error' what(): basic_string::_S_construct null not valid