skinnay@gmail.com wrote:[color=blue]
> i have a program that has two parts, the first part populates a list
> with a loop and cin.getline(). the second part is a command prompt to
> manipulate the list. i have the first part done, and can use a
> redirected file as input. (./main < data.txt) but after the first[/color]
loop[color=blue]
> i want it to drop to a command prompt. is this possible?[/color]
No, it is not: there is only one input stream and once you redirected
it, it is, well, redirected. On some platforms you can explicitly
open the input channel which is normally connected with standard input
(e.g. on POSIX systems /dev/tty should do the trick) but this is
platform specific. The easier and portable approach would be the use
of an input stream ('std::ifstream') for the first part and a stadard
input stream which is not redirected as command prompt.
--
<mailto:dietmar_kuehl@yahoo.com> <http://www.dietmar-kuehl.de/>
<http://www.contendix.com> - Software Development & Consulting