diff --git a/28_find_the_index_of_the_first_occurrence_in_a_string/main.cpp b/28_find_the_index_of_the_first_occurrence_in_a_string/main.cpp new file mode 100644 index 0000000..9497618 --- /dev/null +++ b/28_find_the_index_of_the_first_occurrence_in_a_string/main.cpp @@ -0,0 +1,9 @@ +#include +using namespace std; + +class Solution { + public: + int strStr(string haystack, string needle) { + return haystack.find(needle.c_str()); + } +};