s, size_t s_len) {
for (size_t idx = 0; idx != f_len-s_len; idx++) {
if (memcmp(f + idx, s, s_len) == 0) {
return f + idx;
}
}
return nullptr;
}
Any clue what's wrong here? It never finds anything
What exactly do you want to do?
I want to have a function that finds memory location s with size s_len inside the memory location f with size f_len
works for me
Обсуждают сегодня