What is the meaning of this C++ Error std::length_error

后端 未结 3 2047
小蘑菇
小蘑菇 2021-02-18 13:27

While running my program I get this error:

terminate called after throwing an instance of \'std::length_error\'
  what():  basic_string::_S_create
Abort trap
         


        
3条回答
  •  别跟我提以往
    2021-02-18 13:42

    It means you tried to create a string bigger than std::string::max_size().

    http://msdn.microsoft.com/en-us/library/as4axahk(VS.80).aspx

    An exception of type length_error Class is thrown when an operation produces a string with a length greater than the maximum size.

提交回复
热议问题