473,385 Members | 1,356 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Console output to a fixed area

Hi,

Not sure if it's not a OT, as maybe it's OS dependable, so my apology in advance :)

I need to be able to output to a fixed area on console when i show the work progress in %
If i use smth like printf, it will add lines, but i need to show changing percentage in the same place of console.

Is there a library for that or is it platform-dependable?
I'm using VC++ 6 on Windows
Thank you in advance,
Andrey
Jul 22 '05 #1
3 1681
MuZZy wrote:
Not sure if it's not a OT, as maybe it's OS dependable, so my apology in
advance :)
Alas, it is. It is certainly. Accepted.
I need to be able to output to a fixed area on console when i show the
work progress in %
If i use smth like printf, it will add lines, but i need to show
changing percentage in the same place of console.
Often printing \r would work to move the cursor to the beginning of
the same line, but it won't work on some terminals or on all systems.
Is there a library for that or is it platform-dependable?
There is, and it is.
I'm using VC++ 6 on Windows


comp.os.ms-windows.programmer.win32, microsoft.public.vc.language, etc.

V
Jul 22 '05 #2
Victor Bazarov wrote:
MuZZy wrote:
Not sure if it's not a OT, as maybe it's OS dependable, so my apology
in advance :)

Alas, it is. It is certainly. Accepted.
I need to be able to output to a fixed area on console when i show the
work progress in %
If i use smth like printf, it will add lines, but i need to show
changing percentage in the same place of console.

Often printing \r would work to move the cursor to the beginning of
the same line, but it won't work on some terminals or on all systems.


Ok, thank you, "\r" works perfect for me!
Is there a library for that or is it platform-dependable?

There is, and it is.
I'm using VC++ 6 on Windows

comp.os.ms-windows.programmer.win32, microsoft.public.vc.language, etc.

V

Jul 22 '05 #3
"MuZZy" <le*******@yahoo.com> wrote in message
news:U-********************@rcn.net...
Victor Bazarov wrote:
MuZZy wrote:
Often printing \r would work to move the cursor to the beginning of
the same line, but it won't work on some terminals or on all systems.


Ok, thank you, "\r" works perfect for me!


But as Victor said, be warned that you cannot depend upon this
behavior for all systems or for the same system with a
different output device.

-Mike
Jul 22 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter Fjelsten | last post by:
Guys at comp.infosystems.www.authoring.stylesheets, I have designed a page in (x)HTML transitional that I am happy with in (close to) standard compliant browsers (i.e. Firebird/Opera), but IE...
1
by: Oz | last post by:
This is long. Bear with me, as I will really go through all the convoluted stuff that shows there is a problem with streams (at least when used to redirect stdout). The basic idea is that my...
20
by: mohd hisham | last post by:
Write a C program to construct a queue of integers and to perform the following operations on it: a. insert b. delete c. display The program should print appropriate messages for stack overflow...
1
by: AA | last post by:
Somebody know how to get a fixed line in a console application, so if you want to write a command or something in the console, you have always one fixed line where you can do that. Like a prompt, but...
5
by: Barry Mossman | last post by:
Hi, can I detect whether my class is running within the context of a Console application, vs say a WinForm's application ? also does anyone know whether the compiler or runtime is smart enough...
4
by: Bob | last post by:
I just recently noticed that when I start my applicatoin in debug mode, the IDE hangs (no disk or CPU activity) indefinitely (at least 20 minutes). Pausing the application shows that it's hung up...
2
by: John | last post by:
Hi I need a console output system which needs to display information line by line and scroll once the designated viewable area is filled. User is still able to scroll back to the last x lines to...
7
by: Just Me | last post by:
I am writing a small windows applicationa and I am writing console.writeline data to the console window. But i wanted to clear the area before writing to the window. I found the console.clear...
8
by: Siegfried Heintze | last post by:
The following perl program works when I run it from urxvt-X console on cygwin-x windows LC_CTYPE=en_US.UTF-8 urxvt-X.exe& perl -wle "binmode STDOUT, q; print chr() for 0x410 .. 0x430;" This...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.