Skip to main content
GameDev.net gamedev.net
🔒 Locked

fstream and stdin

Started by MicahJon Oct 9, 2000 at 4:14 PM 0 replies 600+ views
Original Post
MicahJon
MicahJon
This probably isn''t a game programmer''s expertise, but it''s the only board I check frequently enough to bother leaving messages in. I''ve got an ifstream (or ofstream), and I''d like it to be able to take input from a physical file or from stdin. Is there any way to do this, without using a pointer to an istream and assigning the address of an ifstream or std::cin? As far as I can tell, this is the only way, but I hate dealing with dynamically allocated objects when a simple member variable will do. Thanks, Micah

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.