Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Changing output in C
Name: wille Date: April 24, 2009 at 10:26:04 Pacific OS: Microsoft Windows Vista Home Premium CPU/Ram: 2 GHz DualCore/ 2041 MB Product: Lenovo / 42334dg Subcategory: C/C++
Comment:
Hi, I'm writing a program to output a process. I've seen other programs change the ouput that's already in the console, is that possible in C? For example: My program would output this: 1% 2% 3% 4% 5% etc. but I want it to change the last output to the new so that 1% would become 2% and then 3 and so on. And without clearing the screen from all output history. Any help appreciated, and I've tried google, but still, I don't really know what this is called so what would I search for?
Name: shutat Date: April 24, 2009 at 13:50:23 Pacific
Reply:
There isn't really any standard way to manipulate the console as the functions are mostly compiler specific. What compiler are you using?
If you're lucky, you might be able to use windows.h - here's a link to a broad example that covers a lot of console functions.
Look for the SetConsoleCursorPosition function.
HTH
______________________ My work in progress. I hate JS. :P
0
Response Number 2
Name: wille Date: April 24, 2009 at 14:59:22 Pacific
Reply:
Ok thanks, I'll see to that link, I'm using Bloodshed Dev-Cpp.
Live the life as you know it / Wille
0
Response Number 3
Name: shutat Date: April 24, 2009 at 22:28:39 Pacific
Reply:
You might also want to check this page for a devc conio library. The download can be found here. I'm not familiar with dev-c, but the download appears to be some sort of packaged archive that you'd open or install with the compiler.
hope that helps.
______________________ My work in progress. I hate JS. :P
Summary: Does anyone know how to get the output of a DOS program in C++. I have an old program that I use in DOS and I need to get the data it outputs, but I havn't found a good way to do it yet. So if anyon...
Summary: Below is a beta version of what I think you want. It won't update the QP.INI file but will display results on-screen so that you can check if the script is doing what's required. It's up to you to t...