Clrscr Was Not Declared In This Scope Dev C++

Clrscr() and Getch() in C++

May 11, 2010 It is not a good idea to clear the screen, because clearing screen commands are only following that particular software you are using to test your code. I looked into it a while back and found out its not a good idea.

clrscr() and getch() both are predefined function in 'conio.h' (console input output header file).

Clrscr Was Not Declared In This Scope Dev C 4

Clrscr()

It is a predefined function in 'conio.h' (console input output header file) used to clear the console screen.It is a predefined function, by using this function we can clear the data from console (Monitor). Using of clrscr() is always optional but it should be place after variable or function declaration only.

Output

Getch()

It is a predefined function in 'conio.h' (console input output header file) will tell to the console wait for some time until a key is hit given after running of program.

By using this function we can read a character directly from the keyboard. Generally getch() are placing at end of the program after printing the output on screen.

Example of getch()

Output

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

Scope

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

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!

  • 8 Contributors
  • forum 12 Replies
  • 889 Views
  • 1 Year Discussion Span
  • commentLatest Postby Dave SinkulaLatest Post

Getch Was Not Declared In This Scope Dev C++

Recommended Answers

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 …

Jump to Post

All 12 Replies

frrossk2

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/techtalkforums/thread13532-system%28cls%29.html