In C i was able to do things like...

Code:
FILE* file_in;
file_in = stdin;
And then if i want to actually read from a file i just change what file_in is pointing at. When i try to do this in C++ i just get a bunch of errors that i cant read. Is there a way to do this in C++?