hitting backspace to resize a string throws an error c++

后端 未结 0 1467
旧时难觅i
旧时难觅i 2021-01-13 08:32

i try to resize a string in c++ with this

if(sf::Keyboard::isKeyPressed(sf::Keyboard::Backspace))
{
   mainStr.resize(mainStr.size() - 1);
}

相关标签:
回答
  • 消灭零回复
提交回复
热议问题