Null error

im trying to make a text based game and i need alot of strings to make it of course but whenever i run it i get this error:
1
2
terminate called after throwing an instance of 'std::logic_error'
  what():  basic_string::_S_construct NULL not valid

ive looked around and i dont see a fix for it...any sugesstions?
It seems that you are trying to create string using char* that points on null.

For example:
1
2
char* ptr = NULL;
std::string str = ptr;
Last edited on
Topic archived. No new replies allowed.