Reputation:
I know the basics of C++ ncurses, but I do not know how to draw a simple line between two coordinates.
example:
2----------3
How can I accomplish that?
Upvotes: 3
Views: 6612
Reputation: 2058
int hline(chtype ch, int n);
int whline(WINDOW *win, chtype ch, int n);
The
hline
andwhline
functions draw a horizontal (left to right) line usingch
starting at the current cursor position in the window. The current cursor position is not changed. The line is at mostn
characters long, or as many as fit into the window.
As for the character, you probably want ACS_HLINE
, but -
would probably work too... perhaps better.
Upvotes: 5