Hey how to clear the screen in c i m using dev c. Clrscrdoesnot work - Topic in the Software Development forum contributed by sidra 100. Jun 17, 2004  Thread: Dev C Clear Screen. Dev C Clear Screen I just downloaded Dev c because the complier i was using (TC LITE) didn't allow me to make exe files. It also wasn't windows based which is a pain editing in. What i am trying to do is get it to use clrscr.

Dev C++ How To Clear Screen

I use clrscr; to clear the screen but anyone knows how to clear the screen in any particular area. If you need that kind of control you should be using a console graphics library, or better yet, a full graphical application rather than the console.

Click on OK.Now compile your code ( Execute- compile) and run the debugger ( Execute- Debug). Click on the Linker tab and check Generate debugging information. The only thing that I have done to your code is changed the file open line tofin.open( 'c:payrollclass.in', ifstream::in );giving it a full path to the file so there is no confusion as to what file it may open.I'm asumming your data file is a simple text file along the lines of:Wolf 40 50.7Frank 37 24.5Jenny 50 10.2 sample payrollclass.inI have compiled an tested the code with the above sample and it all seems to work.I'm not overly familiar with Dec-C but I think that you can do a rebuild all from the Execute menu. You should get a command line with a prompt (gdb). OK,Go to the Options menu and select Compiler Options. Program stopped working on dev c.

There are two ways to clear the screen in a console application. Example 1 The first method is to use the C run-time system function. The system function invokes the cls command provided by the command interpreter to clear the screen. Jan 16, 2009  Is there any method in C programming by which i can clear a part of the screen, i.e the last few lines displayed? Though im not sure it is what you want, and most people will agree that it is not the best way. By Zopyrus in forum C Programming Replies: 8 Last Post:, 10:20 PM. Screen section to clear. By devour89 in forum C.

-->

Definition

Clears the console buffer and corresponding console window of display information.

Exceptions

An I/O error occurred.

Examples

The following example uses the Clear method to clear the console before it executes a loop, prompts the user to select a foreground and background color and to enter a string to display. If the user chooses not to exit the program, the console's original foreground and background colors are restored and the Clear method is called again before re-executing the loop.

The example relies on a GetKeyPress method to validate the user's selection of a foreground and background color.

This example demonstrates the CursorLeft and CursorTop properties, and the SetCursorPosition and Clear methods. The example positions the cursor, which determines where the next write will occur, to draw a 5 character by 5 character rectangle using a combination of '+', ' ', and '-' strings. Note that the rectangle could be drawn with fewer steps using a combination of other strings.

Remarks

Using the Clear method is equivalent invoking the MS-DOS cls command in the command prompt window. When the Clear method is called, the cursor automatically scrolls to the top-left corner of the window and the contents of the screen buffer are set to blanks using the current foreground background colors.

How to use clear screen in dev c++

Dev C++ How To Clear Screen Door

Note

Attempting to call the Clear method when a console application's output is redirected to a file throws a IOException. To prevent this, always wrap a call to the Clear method in a trycatch block.

Dev C++ Clear Screen Code

Applies to