Note: this only works since sizeof char is defined as 1.
You can solve this by using sizeof(char):
memset(ce, j, sizeof(ce) - sizeof(char));
However, unless I'm very mistaken, sizeof(char) is guaranteed to be 1.
Only if the char array is previously initialized to zero, which I believe is not the case for local variables (their value, and, for pointers, the memory they point to, is undefined).
EDIT: never mind that. And, yes, sizeof(char) is defined to be 1 by the C and C++ standard. Don't have the references with me now, though. Of course it's best to get in the habit of using vectors (and strings) if using C++, there's no overhead and it's just simpler and safer to use, not to mention more idiomatic.