473,465 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Replacing stuff after being written on screen

2 New Member
Hi!
I' fairly new to all this programming, so my question might be stupid, but still, I need an answer =)

I want to replace a single row on the screen, like this.

#include <iostream>
#include "windows.h"

using namespace std;

void main(void)
{
cout << "Loading..." << endl;
for(int x=0;x<20;x++)
{
cout << "|" << endl;
Sleep(70);
REPLACE "|" with "/";
Sleep(70);
REPLACE "/" with "--";
Sleep(70);
Replace "--" with "\\";
Sleep(70);
}
}

I need to know how to replace the symbols but not system("cls") since i still want it to say "Loading..." =) Grateful for any help!
Nov 1 '07 #1
4 1278
dex
4 New Member
No Spoonfeeding per the Posting Guidelines - maybe an algorithm would help more?
Nov 1 '07 #2
dex
4 New Member
By way of explanation
The '\x8' character is backspace and should work on most text based applications on most operating systems.
If you want to do anything trickier than that, then you're probably going to have to specify a platform specific question because Win32 and Unix consoles are very different.
Nov 1 '07 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
Remember, the console comes from the old days when it was a typewriter/printer.

You can put in a new paper and you can type lines but you cannot backup or randomly jump anywhere on the paper.

You could clear the screen and replace "Loading"..." each time".

More than that and you need a graphical program. In this case, a WIn32 application that implements a progress bar.
Nov 1 '07 #4
Cucumber
90 New Member
Back in the MSDOS days, the memory at 0xA000 would hold the values of the screen. So it was possible to mess with the screen writing directly to this segment (AKA Video Memory).

I think it was also possible to write directly to the screen using the software interrupt 0x10, again when using MSDOS. This way you could alter any character at any position.

I havent tried this for years, so I dont know if coding either of these options would work on modern OSes (like XP or VISTA).
Nov 1 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Graham J | last post by:
Hello, Despite GoLive 6 still not wanting to acknowledge its existence, I have been using a 468x60 IFRAME for the single task of displaying advertising banners that are randomly generated by a...
72
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
7
by: Rob Meade | last post by:
Hi all, Been a long time since I've been here... /me waves to all.. Ok - my conundrum.. I have a form where a user can enter text and BB codes...for example:
7
by: Skybuck Flying | last post by:
Hi, if (__builtin_expect (!buffer->__init, 0)) { buffer->__a = 0x5deece66dull; buffer->__c = 0xb; buffer->__init = 1; } I am using visual c 6 and this code doesn't compile, it's probably...
7
by: Ryan Taylor | last post by:
Hi. I have some code that dynamically generates a PDF and spits this content directly to the web browser. I use HTMLDoc to create the Pdf's from html. So the user can click on a button "Print...
32
by: FireHead | last post by:
Hello C World & Fanatics I am trying replace fgets and provide a equavivalant function of BufferedInputReader::readLine. I am calling this readLine function as get_Stream. In the line 4 where...
11
by: Weston Weems | last post by:
I've got the need to have user information for logged in user in a readily avaliable page context (a lot like how Profile is) except not suck. Before we jump to any conclusions, from what I...
29
by: Nick | last post by:
I've seen a few frameworks use the following: function $(id) { return document.getElementById(id); } Then to use: $('something').innerHTML = 'blah'; I'm just trying to roll this out to my...
1
by: TamusJRoyce | last post by:
I have xsl code which I was hoping could be used to replace one specific tag from an xhtml document and output another xhtml document. xsl has phenomenal potential in data replacing, but coming...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.