Anyone know of a way to output editable text to dos?
since printf() outputs text that cannot be edited, is there a way to do that?
Anyone know of a way to output editable text to dos?
since printf() outputs text that cannot be edited, is there a way to do that?
It is possible if you make your own text buffer, and use printf() and gotoxy().
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
do you mind showing me an example magos?
well what you mean, mr. urgent? once the text has been put on the screen, it is no longer editable in any way that could be considered at all portable, except for maybe using \b to erase it and the write over it, but i'm not sure how well even that works.Originally posted by samohx
Anyone know of a way to output editable text to dos?
since printf() outputs text that cannot be edited, is there a way to do that?
do you want to printf() then examine and possibly change the contents, and then put it to the screen? then use sprintf(). but i have a feeling if this is the case, you're trying to do something that you could do with printf if you knew all the format modifiers.
by editable do you mean in a text editor or something? then you dont want it on the screen, you want it outputted to a file. use fprintf().
hello, internet!
I think he means dos-prompt style.
You could printf() the string, and then go getch() and append the character to the string, then rewrite the string. If it is a backspace character, output backspace, space, backspace to the screen and it should have deleted one character. And so on.
**EDIT**
If you're trying to input data, the text is editable. (i.e. scanf()) Of course, that goes without saying, but I decided to say it anyways
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.