Escape sequence of interest?

This is a discussion on Escape sequence of interest? within the C++ Programming forums, part of the General Programming Boards category; Saying I c-out the following... cout << "Is there such a"; Then I call the escape sequence \b... now the ...

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    22

    Escape sequence of interest?

    Saying I c-out the following...

    cout << "Is there such a";

    Then I call the escape sequence \b... now the cursor will be under 'a' in my static string. Saying I wanted to erase 'a' now, but just 'a' after going back a space. Is there an escape sequence to do this? How would I be able to detete just this? The reason I am asking, is because I am making a simple 2D game to test my skills with matrix arrays and everytime I move the player on the screen it is leaving a copy of itself behind. Thanks!

  2. #2
    Registered User dalek's Avatar
    Join Date
    May 2003
    Posts
    135
    You would probably be better off redrawing the screen everytime the character moved. You can have a 2D array that keeps track of everything on screen, and every time your character moves you redraw it.

    But otherwise to do what you are asking, you would simply put a space or ' ' character in your characters place. There is no standard escape character for a delete.
    Last edited by dalek; 06-19-2003 at 07:58 AM.

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    22

    Thumbs up

    ahh, I knew it was something simple. Thanks again for all your help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Immediate programming help! Please!
    By xMEGANx in forum C++ Programming
    Replies: 6
    Last Post: 02-20-2008, 11:52 AM
  2. Weird problem: error C2017: illegal escape sequence
    By h3ro in forum C++ Programming
    Replies: 4
    Last Post: 01-14-2008, 06:29 PM
  3. Escape sequence for &
    By 3saul in forum C Programming
    Replies: 10
    Last Post: 02-28-2006, 09:01 PM
  4. escape sequence
    By Unregistered in forum C Programming
    Replies: 8
    Last Post: 08-01-2002, 08:36 AM
  5. escape sequence "\ooo" and "\xhhh"
    By Unregistered in forum C++ Programming
    Replies: 1
    Last Post: 12-01-2001, 08:30 PM

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