Thread: Win XP and C++(error)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Hi ay_okay's Avatar
    Join Date
    Dec 2004
    Location
    Here
    Posts
    69
    Thanks alot! I'm gonna try that out and send it to my friend.

  2. #2
    Hi ay_okay's Avatar
    Join Date
    Dec 2004
    Location
    Here
    Posts
    69
    to make my own header file(to put it in the include place) how do i do that(to make my own clear screen function)? And if i put the
    Code:
    using std::cout;
    etc..., do I still have to put the std:: in front of all the couts and cins?

  3. #3
    Hi ay_okay's Avatar
    Join Date
    Dec 2004
    Location
    Here
    Posts
    69
    i tried making my own clear function:
    Code:
    int clear()
      {
         cout<<"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
      }
    how do i put the cursor in the top left corner?

  4. #4
    Registered User
    Join Date
    Dec 2004
    Location
    Mercer, PA
    Posts
    25
    just type using namespace std; right below your headers and you will no longer have to use std::cout
    and you can use system("cls"); on xp - iv tried it lol

  5. #5
    Registered User
    Join Date
    Dec 2004
    Location
    UK
    Posts
    109
    Quote Originally Posted by ay_okay
    how do i put the cursor in the top left corner?
    u
    if you want to control the position of the cursor on the screen with that much detail you might want to use something like the *nix curse library (no idea of the windows equivalent) to do your output.

  6. #6
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    Clearing the screen, moving the cursor about and a whole load more console stuff is included in my 6 part console tutorial starting here.

    I suspect the reason it is not working as it is, is because you have compiled it with a 16 bit DOS compiler and are trying to run it as a 32 bit executable. You could try to recompile it on his XP system, or run it in a DOS emulating shell.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed