I’m trying to make my program output a sentence but only if it will start at the beginning of the line. For example, if this is my current console window:
Hello World! [Do not print if text is going to start here]
[Print if text is going to start here]
Is there a way to check if the current output line is empty? Or even the position my new output will start at?
Thanks!
C isn’t going to track the state of the standard output. You’ll have to do it yourself. At every point where you generate output, set a flag that indicates if you ended the line or not.