How to Avoid the Error: Terminate Called After Throwing an Instance of 'Std: :Logic_Error' What(): Basic_String: :_S_Construct Null Not Valid
If(Player! =Null) Player->Shuffled(); I Do Such Things to Avoid Passing a Null Reference to a String Constructor, but When Compiling It Still Comes to Error. 3...
if(player!=NULL)
player->shuffled();
I do such things to avoid passing a null reference to a string constructor, but when compiling it still comes to error.
1 Answer
Somewhere, somehow, you're calling the std::string constructor with the const char* value NULL.
To avoid the problem. Don't do that.