Solved

Easy one...

Posted on 2000-05-12
4
221 Views
Last Modified: 2010-04-02
The question is not much about c++.

In console mode under win9x,sometimes I run an executable which will print many information in the DOS-like console window.The problem is the information always longer than one screen,so when the printing ends,I can only see the last screen of all things got printed.
How to read it screen by screen,or to write it to a file to read all it prints to console window?

Any advice is great!
Thank you
0
Comment
Question by:geeboy
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 1

Expert Comment

by:mournblade
ID: 2805730
<program> > outputfile.txt

e.g. dir > dir.txt

it would put the result you see on standard output (the screen) in the dir.txt file
0
 

Expert Comment

by:rgough
ID: 2805870
.. or pipe it through the "more" command:

e.g. dir | more

will send a page worth of output to the console at a time.
0
 
LVL 1

Expert Comment

by:zoushen
ID: 2807787
 

  U can try ***.exe > record.txt

or like ***.exe >> record.txt


but such ways would not succeed every
time.


for more help , you should study some
old dos commands  .
0
 
LVL 6

Accepted Solution

by:
Talmash earned 50 total points
ID: 2808096
hi ,
try one of these :

file_name > text_file.txt

*** such command change the standard output from the screen to the file you gave its name after the ">" sign .

As I understood you run over PC station using Dos shell (screen) ,

if you're using linux/unix shell you can write just the same as above or use the pipe tool (more or + in most environments )

file_name | more
or
file_name | +


regards ,

Talmash
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question