Sometimes, people ask "Why use that old Turbo C/C++ ?", and I just smile:
Originally Posted by nowber
Note that Turbo C ver. 1.01 had "int main()", before K&R's "The C Programming Language".
window Defines active text-mode window.
void window(int left, int top, int right, int bottom);
The top left corner of the screen is (1,1).
window defines a text window onscreen. If the coordinates are in any way
invalid, the call to window is ignored.
þ left and top are the screen coordinates
of the upper left corner of the window.
þ right and bottom are the screen
coordinates of the lower right corner.
The minimum size of the text window is one
column by one line. The default window is
full screen, with these coordinates:
þ 80-column mode: 1,1,80,25
þ 40-column mode: 1,1,40,25
Return Value: None.
window works with IBM PCs and compatibles only.
A corresponding function exists in Turbo Pascal.
clreol delline gotoxy puttext
clrscr gettextinfo insline textmode
cprintf("This is a test\r\n");
Lacking conio.h's help, you can still print inside a window, just as you can print up any columns, in C.
You just need variables for things like lmargin, rmargin, toprow, botrow, to define the left margin, right margin, top row, bottom row, etc.
So in a function, you send it the address of your char array you want printed, and it will handle it from there. It's not as nice as window, but it can be done easily.