alansiqueira27
alansiqueira27

Reputation: 8534

Is there any default function in C++ to search for a word in a string?

Is there any default function in C++ to search for a word in a string?

Upvotes: 0

Views: 150

Answers (2)

Jon
Jon

Reputation: 437904

That would be strstr if you want a plain function to work with char*, std::string::find if you work with std::string.

Upvotes: 3

linuxuser27
linuxuser27

Reputation: 7353

Check out string::find()

Upvotes: 4

Related Questions