the delete key word...

This is a discussion on the delete key word... within the C++ Programming forums, part of the General Programming Boards category; hi, just wondering about the "delete" keyword, what is the syntax for this command, and is there a way that ...

  1. #1
    Registered User Finchie_88's Avatar
    Join Date
    Aug 2004
    Posts
    154

    Question 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???


  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,985
    Take a look at cprogramming.com's own FAQ on the topic
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Registered User Finchie_88's Avatar
    Join Date
    Aug 2004
    Posts
    154
    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...

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    >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.
    My best code is written with the delete key.

  5. #5
    Banned
    Join Date
    Aug 2004
    Posts
    128
    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. please help with binary tree, urgent.
    By slickestting in forum C Programming
    Replies: 2
    Last Post: 07-22-2007, 07:55 PM
  2. brace-enclosed error
    By jdc18 in forum C++ Programming
    Replies: 53
    Last Post: 05-03-2007, 05:49 PM
  3. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 09:00 AM
  4. Problem need help
    By Srpurdy in forum C++ Programming
    Replies: 1
    Last Post: 07-24-2002, 12:45 PM
  5. memory management...
    By master5001 in forum Game Programming
    Replies: 24
    Last Post: 01-07-2002, 04:50 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21