让我们假设您有这样的东西(x.cpp): char* str = <some_function_which_returns_char*>; // Such as hello, hell我写过:
b x.cpp:3 if $_regex(str, "hell") // At line number 3 of above snapshot.
我尝试在不使用字符串库的情况下比较从命令行参数接收的字符串。我已经创建了一个函数来比较char*的值,它适用于我在程序中创建的字符串,但不适用于在命令行传递的字符串。\n"); if(comparestr(*(argv+1),"hell"))string 1 = hello, string 2 = hello
len a = 5, len b