How can I get the input stream in commandline application ?

N

Nelson

Subject: How can I get the input stream in commandline application ?

Hi guys!
I have to get the input stream in my win32 commandline application.
Using another words, I want to catch content of input stream file
given like this:

myapp.exe < data.txt

How can I do it?

Thanks alot.
Nelson
 
O

Ondra Holub

Nelson napsal:
Subject: How can I get the input stream in commandline application ?

Hi guys!
I have to get the input stream in my win32 commandline application.
Using another words, I want to catch content of input stream file
given like this:

myapp.exe < data.txt

How can I do it?

Thanks alot.
Nelson

Simply read from std::cin.
 
K

Kai-Uwe Bux

Nelson said:
Subject: How can I get the input stream in commandline application ?

Hi guys!
I have to get the input stream in my win32 commandline application.
Using another words, I want to catch content of input stream file
given like this:

myapp.exe < data.txt

How can I do it?

The input stream is usually bound to std::cin from <iostream>.


Best

Kai-Uwe Bux
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top