0

I currently have no base code, and please don't recommend the ncurses library. Here is what I want to do: I want to be able to clear the terminal window like the clear command but then I want to be able to write to any part of the terminal window, like how text editors work.

I know that nobody has asked this question so dont close it

  • FYI -- What you ask for is not possible in standard C++. That's why libraries like ncurses exist. As to text editors, they are way more sophisticated than what you believe they are. – PaulMcKenzie Dec 20 '22 at 09:10
  • please don't tell us what to do. what is wrong with ncurses? – Neil Butterworth Dec 20 '22 at 09:11
  • The alternative to ncurses is painstakingly emitting terminal control codes by hand. I am still going to recommend ncurses (or a more modern TUI library like Tickit) as the least painful way forward. – Botje Dec 20 '22 at 09:11
  • *I know that nobody has asked this question so dont close it* -- This has been asked many times, here and in other places. The answers given just aren't acceptable to you, for whatever reason. – PaulMcKenzie Dec 20 '22 at 09:13
  • 1
    There you go. Marked as duplicate of a question that doesn't use ncurses. Now please still go use ncurses. – Botje Dec 20 '22 at 09:17
  • @NeilButterworth I really just want to be able to do something with only the std lib. – PranshuTheGamer Dec 20 '22 at 09:17
  • @PaulMcKenzie I want to be able to write to any location in the terminal without reprinting the whole thing. like re writing the above lines. – PranshuTheGamer Dec 20 '22 at 09:18
  • 1
    @PranshuTheGamer -- There are no standard C++ functions that control access to the terminal in the way you are mentioning. There is no mention of "terminal" in the C++ language. This must all be done by something outside standard C++, and the duplicate link shows this. – PaulMcKenzie Dec 20 '22 at 09:23
  • "The terminal" is a separate program that is interpreting the output of your program. C++ *doesn't* define functions for interacting with your specific terminal program – Caleth Dec 20 '22 at 10:29

0 Answers0