| | |
gotoxy function
Please support our C advertiser: Programming Forums - DaniWeb Sister Site
![]() |
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.
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.
I wake up! And my mind's out, never again will I sell out. Converting vegetarians.
Into the midnight giving it to you, I don't know it just feels right.
This is the time of the revolution, Cooking the next step.
Converting vegetarians, minding the gap since 1996
Into the midnight giving it to you, I don't know it just feels right.
This is the time of the revolution, Cooking the next step.
Converting vegetarians, minding the gap since 1996
>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).
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).
"Sometimes, when I lie in bed at night and look up at the stars, I think to myself, "Man! I really need to fix that roof."-Jack Handy
![]() |
Similar Threads
- gotoxy function in turbo c++ (C++)
- Possible to erase in the console? (Python)
- maze game (C++)
- clrscr(); and gotoxy(); (C++)
- Console setting (C++)
- Help with C++ (C++)
Other Threads in the C Forum
- Previous Thread: Passing a pointer
- Next Thread: AntiVir reports code as trojan: TR/Eplx.IMG-WMF.bfg
| Thread Tools | Search this Thread |
#include adobe ansi api append array arrays asterisks binarysearch changingto char character cm copyimagefile cprogramme creafecopyofanytypeoffileinc csyntax database directory dynamic execv feet fgets file fork framework frequency function getlasterror givemetehcodez global grade gtkgcurlcompiling hacking hardware highest histogram include incrementoperators infiniteloop input interest kernel keyboard kilometer license linked linkedlist linux linuxsegmentationfault list lists locate logical_drives looping loopinsideloop. lowest match matrix meter microsoft motherboard mqqueue number odf opensource overwrite owf pattern pdf performance pointer posix probleminc process program programming radix recursion recv repetition research reversing scripting segmentationfault sequential socket socketprograming standard string systemcall testing threads turboc unix user voidmain() wab windows.h windowsapi





