943,916 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 1402
  • C++ RSS
Jan 11th, 2007
0

Help

Expand Post »
I have been working with C, in TURBO compiler.
Now I have started C++, in VC++ compiler.
But, now, I m unable to clear screen (clrscr() don't work), can't write at any desired location (gotoxy() don't work)
Can anybody plz tell me their equivalents ?
Reputation Points: 9
Solved Threads: 3
Light Poster
apurv is offline Offline
45 posts
since Jan 2007
Jan 11th, 2007
0

Re: Help

Click to Expand / Collapse  Quote originally posted by apurv ...
Can anybody plz tell me their equivalents ?
system("cls"); for clearing the screen. This is NOT portable so it's not a good thing to use it. Why do you need it?

Gotoxy(); is a different story. You first need a handle to your console window, use GetConsoleWindow() for that. Then when you have the handle use SetConsoleCursorPosition() to set the cursor.
Last edited by Nick Evan; Apr 27th, 2011 at 7:01 am.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006
Jan 11th, 2007
0

Re: Help

Well the best is to avoid non standard functions so you will not have this type of problems. For clrscr() read this.
Last edited by andor; Jan 11th, 2007 at 10:37 am.
Reputation Points: 251
Solved Threads: 29
Posting Whiz in Training
andor is offline Offline
274 posts
since Jun 2005
Jan 11th, 2007
0

Re: Help

Click to Expand / Collapse  Quote originally posted by andor ...
Well the best is to avoid non standard functions so you will not have this type of problems. For clrscr() read this.
I like option 4....
Last edited by Nick Evan; Apr 27th, 2011 at 7:01 am.
Moderator
Featured Poster
Reputation Points: 4142
Solved Threads: 394
Industrious Poster
Nick Evan is offline Offline
4,132 posts
since Oct 2006
Jan 11th, 2007
0

Re: Help

Reputation Points: 251
Solved Threads: 29
Posting Whiz in Training
andor is offline Offline
274 posts
since Jun 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Help With Transposition Cipher Loop ...
Next Thread in C++ Forum Timeline: creating variables





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC