Guest_imported
New member
- Jan 1, 1970
- 0
- 0
- 0
Hi, I'm writing a program in C++, compiling using the free Borland 5.5, and I'm writing it with DOS as my target OS (hopefully for the last time ). I have need for text colors and text windows, and I discovered the constream type, which seems to work fine, except when I input. When I input, I'm currently using cin >>, and the next thing I output always gets output on the left edge of the screen, ignoring the window's restraints. I've included a simple program that demonstrates what I mean. How do I make it so the output is within the window? Thanks a lot...
#include <iostream.h>
#include <constrea.h>
int main()
{
int x;
constream cout;
cout.window(2,2,79,24);
cout.clrscr();
cout << "Test\n";
cin >> x;
cout << "Test 2\n";
return 0;
}
The "Test 2" gets output as if there were no window.
???
#include <iostream.h>
#include <constrea.h>
int main()
{
int x;
constream cout;
cout.window(2,2,79,24);
cout.clrscr();
cout << "Test\n";
cin >> x;
cout << "Test 2\n";
return 0;
}
The "Test 2" gets output as if there were no window.
???