zxCoder
V2EX  ›  问与答

terminate called after throwing an instance of 'std::regex_error'

  •  
  •   zxCoder · Jun 14, 2021 · 909 views
    This topic created in 1806 days ago, the information mentioned may be changed or developed.

    一夜之间所有代码都跑不了了,这是发生了什么吗

    #include <string>
    #include <regex>
    
    int main() {
        std::regex re=std::regex ("keyword");
        std::string str=std::string("keyword-test");
        std::regex_search(str,re);
        return 0;
    }
    

    terminate called after throwing an instance of 'std::regex_error' what(): Unexpected character in brace expression.

    Process finished with exit code 134 (interrupted by signal 6: SIGABRT)

    1 replies    2021-06-15 00:39:12 +08:00
    ysc3839
        1
    ysc3839  
       Jun 15, 2021
    试试重启,重装?
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3515 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 11:14 · PVG 19:14 · LAX 04:14 · JFK 07:14
    ♥ Do have faith in what you're doing.