cterminalclion

A way to clear the screen in C? Methods like clrscr() through conio and system("cls") is not working. Is this also a thing specific with Clion?


*Additional required info, I'm on windows, I use CLion & I'm still kinda new. *

So I was recently trying to use the clrscr() from conio.h & also system("cls") from stdlib.h it seems like it's not working. Clrscr() not being able to use.

I also tried using system("cls") but it also doesn't seem to work and rather than screen clear being performed, it is just echoing my input. Input being echoed when I use system("cls")

Here, the system("cls") is used after the register and login display right over here on this code: Code for system("cls")

This is also the same place where I tried using clrscr() so yea I would love some help on this.

I looked at some other posts & also tried to gpt it and most of the measures that I tried wasn't working so I'm curious if it's a CLion specific feature as well?


Solution

  • Maybe you can enable Emulate terminal in the output console inside Run | Edit Configurations in CLion. I've tried it in my Mac and it works fine when clearing the built-in terminal. But there're also some limitations about this feature JetBrains CLion Doc.