-1

dearest
i want to make a program in which i want to move a "%" to each side of a screen so how could be made please help earlier

4
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by sapan645
0

I'm assuming you mean a console program?
You'll have to know the width of the screen, typically is is 80x25, but it can always be different.

You can't do a gotoxy function in pure C, you'll have to read into the O/S dependent libraries for your system (I don't know what that is). If all you want to do is put a character on both sides of the screen, it would be easier to just put one, then put 78 spaces, then put another one.

1

>You can't do a gotoxy function in pure C, you'll have to read into the O/S dependent libraries for your system (I don't know what that is)
gotoxy() doesn't have much to do with os dependancy. It's a function that is not part of C, so many compiler's do not include it.

If i'm not mistaken, PDcurses and Ncurses libraries have more portable substitutes. You may also be able to get the screen width with them. There is no way you can do this with standard C, unless you assume the terminal width is 80 (which may not be the case).

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.