-
the delete key word...
hi, just wondering about the "delete" keyword, what is the syntax for this command, and is there a way that it can be used with varibles, for example, you could delete a varible, or text which is already on the screen, hence clear the screen???
Is there any1 out there who can help???
:)
-
Take a look at cprogramming.com's own FAQ on the topic
-
yer, thats answers 1 of my questions, but is there a way that that could be used to delete a previously printed message on the screen. The way it is, that can delete varibles, but can it be used as a method of clearing the screen???
But thanks anyway, that does help me a lot...
:)
-
>but is there a way that that could be used to delete a previously printed message on the screen
Um...no. delete is used to release memory allocated with new. That's a totally different operation than redrawing pixels on your monitor. If you really need to clear the screen (I don't see much use for it) then you can check the FAQ entry for a few suggestions.
-
you could use printf("\b");
after you print something such as
Code:
cout << "My words!"; \\Says words
getch(); \\Pauses the screen till you hit a key (requries <conio.h>)
printf("\b");\\does backspace to the screen