ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hi.. i have done many graphics programs in C using the Turbo C editor.. but till now, i haven't used mouse in my programs. how do we use the mouse. if possible, please have a sample program to explain the procedure for using the mouse.....
1. What OS you're running (using the "system pointer" in a graphical environment like MS-Windows or the Linux GUI is light years away from doing serial I/O with "mouse input" under DOS)
2. Your choice of language and programming library (C? C++? Python? Java?)
Since you're probably running under some kind of GUI (either Linux or Windows), and since it doesn't sound like programming language is too much of an issue, you might want to consider learning Java (which has GUI libraries - including mouse support - built in).
Seriously, you should consider checking out one of the many free compilers available. TC++ not only creates binaries for an outdated OS (DOS), but it is not very ANSI compliant as it has been around long before the days of the final ANSI/ISO standards were put in place.
If switching compilers isn't an option... Well, I seem to remember needing to do some interrupt work to interact with the mouse drivers in TC++. Since you are probably running it with DOS emulation under XP or something of the sort, I'm not sure how well that works anymore.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.