Results 1 to 8 of 8

Thread: Two newbie questions

  1. #1
    Sc0rp
    Guest

    Talking Two newbie questions



    1) Is there a way to print a character in a specific location on the screen (in a console app)?

    2) How can I get a single keypress without using cin?

    Thanks.

  2. #2
    Aragorn
    Guest
    I think that you need gotoxy & getchar. I'm not sure, though...
    sorry!

  3. #3
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't think you have gotoxy with anything except Borland, and I don't recall seeing it in the standard.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  4. #4
    Aragorn
    Guest
    oops, sorry.
    I remember using it once, but i didn't know it was non-standard.
    I thought it was in <conio.h> library. Isn't that standard?

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I don't think so - conio.h is a DOS header (although there's a version for console programs). My copy of VC++5 doesn't have any reference to gotoxy.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6
    Sc0rp
    Guest
    What about getting a single keystroke?

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    getch()
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8
    Sc0rp
    Guest
    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width