! means something entirely different in C/C++ and should not be used as a factorial operator. There isn't any way to get the syntax right with it anyway.
Overloading operators is not for adding new operators to the language. It's for making existing operators work with new classes. You shouldn't try to create anything new with it.
That would only work for a class of your own and even then you would have to write !n.
Since ! is "logical not" in C++, giving it a completely different meaning such as this is out of the question.
Just use a function.
I have the same book. That author is Bjarne Stroustrup so he knows what he is talking about.
I did the same exercise last year. The OP is misunderstanding what Stroustrup wants the learner to do.
I understood it as follows:
1) Input n! and retrieve using getch().
2) Check if the second character == !.
3) If yes, then call function that computes n * (n-1) * (n-2) etc.
That chapter focuses on token streams, so Stroustrup wants the learner to create an input stream and then test if the last token in the stream is equal to the exclamation point.