As the title may suggest, I'm having problems using the mouse and keyboard simultaneously.
I'm a 12th grade student from India. I'm working on making a simple version of Gmail with graphics, some animations (basically making it look and presentable) and extensive file handling as part of my C++ project that students have to submit every year. I'm making it on Turbo C++ which is obviously (not, for my school at least) an ancient IDE with amazing features that doesn't include Multi-Threading....
So, what I basically want is to be able to use the mouse on the screen and be able to perform selections (and all the other stuff which I might need the mouse for) as well as when the user starts to type something, be able to sense it and echo it on to the screen.
This is what I've come to:
Code:
while ( !kbhit() )
{
if( kbhit() )
getche(); //echo to screen
else
//The mouse functions using union REGS
}
However, this isn't working (It only runs until the first key is pressed and then stops). I need help with knowing how both can be used simultaneously....
I don't know of any way other than an infinite loop for using the mouse features in Turbo.