Clear Screen in Dev C++ (CSDC)



AVAILABLE:    5

Assalamu'alaikum. Mr. Wan, I would like to ask: in Borland C++ we use clrscr() to clear the console screen. What should we use if we want to clear the screen in Dev C++? Thank you.

This question was raised by a member named Maze Muke.

Answer
It's simple, bro. Let me show you the following example code:

#include <stdlib.h> // <- Include this library in the header
void main() {
    system("cls"); //<-- Use this command to clear the screen
}

Post a Comment

Previous Next

نموذج الاتصال