Welcome to Dream.In.Code
Become a C++ Expert!

Join 137,200 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 2,316 people online right now. Registration is fast and FREE... Join Now!




can't get all lines in DOS windows

 
Reply to this topicStart new topic

can't get all lines in DOS windows

kckc314
9 Jul, 2008 - 02:28 AM
Post #1

D.I.C Head
**

Joined: 5 Apr, 2008
Posts: 128

i have developed a C program to display numbers. when i run the program, it opens a DOS window and displays the numbers line by line, keep on moving up in the DOS window, i assume there will be several hundreds up to a thousand line of numbers. i wait until it finishes running and want to highlight all the numbers and copy them to a text document. unfortunately, when i scroll up in the DOS window, it only shows part of the numbers, 50-100 lines may be, it doesn't show all the numbers i want. when it was running i can see all the number lines before it comes to stop. i guess there is a buffer limitation in DOS windows i am not sure. is there something i need to configure in DOS window? thanks in advance.
User is offlineProfile CardPM
+Quote Post

Mallstrop
RE: Can't Get All Lines In DOS Windows
9 Jul, 2008 - 03:36 AM
Post #2

New D.I.C Head
*

Joined: 19 Jun, 2008
Posts: 32



Thanked: 1 times
My Contributions
Right click the dos window on the blue bar at the top of the window and select properties, it'll let you set the Screen Buffer Size to a value that works for you.

You can also right click on the command prompt tab thingy next to the start button for the Properties.

This post has been edited by Mallstrop: 9 Jul, 2008 - 03:40 AM
User is offlineProfile CardPM
+Quote Post

kckc314
RE: Can't Get All Lines In DOS Windows
9 Jul, 2008 - 03:55 AM
Post #3

D.I.C Head
**

Joined: 5 Apr, 2008
Posts: 128

i have tried that but it's not the screen buffer size issue.

when i run the program, on the DOS window it appears 1 to 1000 let say,
1
2
3
4
5
6
.
.
.
1000
upon it finishes running, i scroll back up, i can only see let say 800.....1000, only part of the numbers, but where are the 1....700? it doesn't display all the lines.
User is offlineProfile CardPM
+Quote Post

Mallstrop
RE: Can't Get All Lines In DOS Windows
9 Jul, 2008 - 03:58 AM
Post #4

New D.I.C Head
*

Joined: 19 Jun, 2008
Posts: 32



Thanked: 1 times
My Contributions
You need to re run the program before the changes take effect.
User is offlineProfile CardPM
+Quote Post

no2pencil
RE: Can't Get All Lines In DOS Windows
9 Jul, 2008 - 03:58 AM
Post #5

My fridge be runnin OH NOEZ!
Group Icon

Joined: 10 May, 2007
Posts: 6,504



Thanked: 67 times
Dream Kudos: 2425
Expert In: Goofing Off

My Contributions
QUOTE(kckc314 @ 9 Jul, 2008 - 07:55 AM) *

.
1000
upon it finishes running, i scroll back up, i can only see let say 800.....1000, only part of the numbers, but where are the 1....700? it doesn't display all the lines.

You'll need to right click on the title bar for your dos window & change the value of how much history that it holds. I don't have an MS system in front of me, so I can't offer you any more help than that. As well, I'm not sure off the top of my head (I'm sure Google could find your answer) but there is a maximum amount it can hold, I'm sure. The last thing you want is to have 3 or 4 DOS windows eating up half your ram with history output. If you truly need to reference the data, just use a redirect & send it to a text file & retrieve it at your leisure.
User is offlineProfile CardPM
+Quote Post

AndyH1963
RE: Can't Get All Lines In DOS Windows
9 Jul, 2008 - 04:34 AM
Post #6

New D.I.C Head
Group Icon

Joined: 22 Jun, 2008
Posts: 32


My Contributions
Why don't you send the output to a file on disk?
User is offlineProfile CardPM
+Quote Post

kckc314
RE: Can't Get All Lines In DOS Windows
9 Jul, 2008 - 05:16 AM
Post #7

D.I.C Head
**

Joined: 5 Apr, 2008
Posts: 128

good idea, just save the output to a file on disk as i can refer to it at my own leisure. so i assume what i will do, in DOS prompt just browse to the directory where i save the program, before that create a file either test.txt or test.doc, let say after i compile my program name called test.exe, then in DOS prompt i just enter test>>test.txt to redirect the output into the file. is that correct?
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/4/08 12:23PM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month