It would be the same type of situation, but you would use the cin object instead:
std::cin >> n;
Also, notice the use of the '>>' operator instead of the '<<' operator.
You have to be cautious about this situation though. If 'n' is a numeric type (like in your C code) and the user inputs char type data (i.e. "hello", or 'a') you will wind up with a corrupted input stream. If that happens, read this.
There are other input operators/functions available which help avoid the situation (such as get()), but this is probably the most-direct translation of the posted code.