我正在尝试检查字符串是否包含C中的子字符串,如:
char *sent = "this is my sample example"; char *word = "sample"; if (/* sentence contains word */) { /* .. */ }
什么是使用而不是string::find在C++中?
string::find
c string
c ×1
string ×1