include "stdafx.h" #include <iostream> #include <string> using namespace std; int main() { const string source = "greateateateat"; const string lexeme = "eat"; unsigned lexeme_count = 0; for (size_t pos = 0; pos < source.size(); pos += lexeme.size()) { pos = source.find(lexeme, pos)
include "stdafx.h" #include <iostream> #include <string> using namespace std; int main() { const string source = "greateateateat"; const string lexeme = "eat"; unsigned lexeme_count = 0; for (size_t pos = 0; pos < source.size(); pos += lexeme.size()) { pos = source.find(lexeme, pos)