I would really recommend learning about algorithms header.
Below is two ways to normalize the ISBN.
The first one is simpler - in case you know that the only characters you want to remove are hyphens.
The second one is somewhat more complicated but it removes all non-digits (although don't ISBN's allow X as the last digit?). Even if things such as std::not1 and std:tr_fun are a bit hard for you now, defining your own separate one-line function for remove_if would still be greatly simpler than writing the whole loop for stripping characters.
Code:
#include <cstdio>
#include <cstring>
#include <algorithm> // remove, remove_if
#include <functional> // not1, ptr_fun
#include <cctype> // is-digit
using namespace std;
int main() {
char s[] = "123-123-12";
char t[] = "ISBN: 123 34 234 5";
//remove algorithms return an iterator (here pointer) to the first item (character)
//that doesn't belong to the stripped range.
//As these are C-style strings, a NULL-terminator goes there.
//removing only hyphens
*remove(s, s + strlen(s), '-') = '\0';
//removing all non-digits
*remove_if(t, t + strlen(t), not1(ptr_fun(isdigit))) = '\0';
printf("%s\n", s);
printf("%s\n", t);
}