User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,546 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,377 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums
Views: 924 | Replies: 4
Reply
Join Date: Jan 2007
Posts: 45
Reputation: apurv is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 3
apurv apurv is offline Offline
Light Poster

Help Help

  #1  
Jan 11th, 2007
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 ?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Location: the Netherlands
Posts: 1,825
Reputation: niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all 
Rep Power: 11
Solved Threads: 192
niek_e's Avatar
niek_e niek_e is offline Offline
Posting Virtuoso

Re: Help

  #2  
Jan 11th, 2007
Originally Posted by apurv View Post
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.

Regards Niek
Want better/more replies to your questions? Wrap your code in [code] [/code] tags!
do NOT pm me for help, in the best case, you'll get ignored
Reply With Quote  
Join Date: Jun 2005
Location: Novi Sad, Serbia
Posts: 273
Reputation: andor has a spectacular aura about andor has a spectacular aura about andor has a spectacular aura about 
Rep Power: 6
Solved Threads: 29
andor's Avatar
andor andor is offline Offline
Posting Whiz in Training

Re: Help

  #3  
Jan 11th, 2007
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.
If you want to win, you must not loose (Alan Ford)
Reply With Quote  
Join Date: Oct 2006
Location: the Netherlands
Posts: 1,825
Reputation: niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all niek_e is a name known to all 
Rep Power: 11
Solved Threads: 192
niek_e's Avatar
niek_e niek_e is offline Offline
Posting Virtuoso

Re: Help

  #4  
Jan 11th, 2007
Originally Posted by andor View Post
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....

Niek
Want better/more replies to your questions? Wrap your code in [code] [/code] tags!
do NOT pm me for help, in the best case, you'll get ignored
Reply With Quote  
Join Date: Jun 2005
Location: Novi Sad, Serbia
Posts: 273
Reputation: andor has a spectacular aura about andor has a spectacular aura about andor has a spectacular aura about 
Rep Power: 6
Solved Threads: 29
andor's Avatar
andor andor is offline Offline
Posting Whiz in Training

Re: Help

  #5  
Jan 11th, 2007
If you want to win, you must not loose (Alan Ford)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb C++ Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the C++ Forum

All times are GMT -4. The time now is 5:07 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC