Groups | Search | Server Info | Login | Register
Groups > comp.os.ms-windows.programmer.misc > #16
| Newsgroups | comp.os.ms-windows.programmer.misc |
|---|---|
| Date | 2012-09-05 03:05 -0700 |
| Message-ID | <5f9a6659-2a45-4928-a775-0f96217ccba0@googlegroups.com> (permalink) |
| Subject | Command line programming - how to switch off line feed... |
| From | commodorecomputerclub@googlemail.com |
Hi,
I'm trying to work out how to stop my programming automatically forcing a line feed when it reaches the last character of the command line console. I'm using the C programming language.
So, say I set up my console like this:
// 80 x 50:
system("mode CON: COLS=80 LINES=50");
// Black background, cyan text:
system("color 03");
// Clear screen:
system("cls");
// Set title:
system("title Console started at %TIME% on %DATE%");
and I have a function to switch off the blinking cursor too, and to set the X and Y co-ordinates for my text.
Now, I want to write to the bottom row of the console and write 80 characters, like:
gotoxy(0,49);
for(int i=0; i<80; i++)
{
printf(".");
} // Forces line feed after the last character is written :-/
Obviously, if I could avoid the automatic line feed somehow, this would be helpful. Would I have to use a pointer to write the character at the last character of the console instead of printing it?
Any help or tips would be good,
Many thanks,
Shaun.
Back to comp.os.ms-windows.programmer.misc | Previous | Next | Find similar
Command line programming - how to switch off line feed... commodorecomputerclub@googlemail.com - 2012-09-05 03:05 -0700
csiph-web