944,110 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 98529
  • C++ RSS
You are currently viewing page 1 of this multi-page discussion thread
Dec 6th, 2004
0

how to make clrscr() work

Expand Post »
guys, please help me...

how do i make clrscr() work? my friend told me to include conio.c, but i think that my version of dev-c++ doesn't have that...so i tried downloading conio.c...but the problem is, clrscr() still doesn't work in my pc but it works in my friend's pc...we're both using dev-c++...

what do i need to do? please help me...

super thanks in advance!
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
potential is offline Offline
13 posts
since Sep 2004
Dec 6th, 2004
0

Re: how to make clrscr() work

Quote originally posted by potential ...
guys, please help me...

how do i make clrscr() work? my friend told me to include conio.c, but i think that my version of dev-c++ doesn't have that...so i tried downloading conio.c...but the problem is, clrscr() still doesn't work in my pc but it works in my friend's pc...we're both using dev-c++...

what do i need to do? please help me...

super thanks in advance!
Read this:
http://www.daniweb.com/techtalkforum...%28cls%29.html
Reputation Points: 17
Solved Threads: 9
Posting Whiz in Training
frrossk is offline Offline
220 posts
since Sep 2004
Dec 6th, 2004
0

Re: how to make clrscr() work

HI WEL I USE BORLAND C++. BUT IT IS SUPPOSED TO WORK ON ANY VERSION OF C++. JUST VERIFY THIS
1. ARE ALL YOOUR HEADER FILE ON A SINGLE FOLDER. MAYBE YOU COULD HAVE INSTALLED IT NOT PROPERLY.
IN TURBO C++ I USE #INLCUDE<CONIO.H>

AND I USE CLRSCR();

TRY IT ON YOUR DEV C++. BY THE WAY CAN ANYBODY TELL WATS THIS DEV C++. IS IT ANY DIFFERENT FROM TURBO OR BORLAND C++ :lol:
Reputation Points: 11
Solved Threads: 1
Junior Poster
anastacia is offline Offline
142 posts
since Nov 2004
Dec 6th, 2004
0

Re: how to make clrscr() work

Quote originally posted by anastacia ...
BUT IT IS SUPPOSED TO WORK ON ANY VERSION OF C++.
NO, IT ISN'T.

Quote originally posted by anastacia ...
BY THE WAY CAN ANYBODY TELL WATS THIS DEV C++. IS IT ANY DIFFERENT FROM TURBO OR BORLAND C++ :lol:
HTTP://WWW.BLOODSHED.NET/DEVCPP.HTML



DON'T TYPE IN ALL CAPS.
Team Colleague
Reputation Points: 2780
Solved Threads: 312
long time no c
Dave Sinkula is offline Offline
4,790 posts
since Apr 2004
Dec 6th, 2004
0

Re: how to make clrscr() work

Look at the big button on your keyboard marked "Caps Lock". Press it until the CAPITAL LETTERS go away.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 6th, 2004
1

Re: how to make clrscr() work

clrscr() is a presumptuous Borland fetish. Not every user of your program wants it!!!

In Dev C++ you can use system("CLS") to do the trick, the old DOS command. Include the stdlib.h for the system() function.

By the way, Dev C++ is a very nice IDE for a set of open source GNU compilers (mainly GCC and G++). The IDE comes in Windows and Linux versions. For Linux CLS has to be replaced with something else.
Moderator
Reputation Points: 1333
Solved Threads: 1404
DaniWeb's Hypocrite
vegaseat is offline Offline
5,792 posts
since Oct 2004
Dec 7th, 2004
0

Re: how to make clrscr() work

not at all a fetish, just overused by people that read tutorials by other people who abused it

There can be good reason to use it, for example if you were creating a fullscreen DOS application in Turbo Vision and wanted to clean up after yourself when terminating it.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Dec 7th, 2004
0

Re: how to make clrscr() work

ok guys thanks for the clarification.caps lock on was my typing mistake. sorry
Reputation Points: 11
Solved Threads: 1
Junior Poster
anastacia is offline Offline
142 posts
since Nov 2004
Jan 11th, 2005
0

Re: how to make clrscr() work

thanks for all the help!
Reputation Points: 10
Solved Threads: 0
Newbie Poster
potential is offline Offline
13 posts
since Sep 2004
Jan 25th, 2005
0

Re: how to make clrscr() work

Try to use 'fflush()' function with the argument 'stdout'.
When ever you want to clear your screen, just add this fflush(stdout). But remmember that it will fflush all standard out-put. But you use this. :cheesy:
Reputation Points: 10
Solved Threads: 2
Light Poster
letmec is offline Offline
33 posts
since Sep 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

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.
This thread is currently closed and is not accepting any new replies.
Previous Thread in C++ Forum Timeline: Write C++ Code
Next Thread in C++ Forum Timeline: GUI Suggestions





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


Follow us on Twitter


© 2011 DaniWeb® LLC