D
Doug Harvey
Hi there. Just trying to figure out how to do something in c++
In "C", I would typically do something like this
FILE *inp = stdin; /* default to stdin *
if (input_file
inp = fopen(input_file)
/* ... *
I tried doing something like this in C++, but couldn't get anything t
compile
ifstream inp = &cin
but no go
Any suggestions would be appreciated, in addition to comments abou
whether there is a more appropriate way to do this in c++
dou
--
In "C", I would typically do something like this
FILE *inp = stdin; /* default to stdin *
if (input_file
inp = fopen(input_file)
/* ... *
I tried doing something like this in C++, but couldn't get anything t
compile
ifstream inp = &cin
but no go
Any suggestions would be appreciated, in addition to comments abou
whether there is a more appropriate way to do this in c++
dou
--