Which api should I use for my c++ program?
-
I'm trying to write a program in c++ that will be usable on any or many platforms. I need an api or code to help me take in mouseclicks and output images. I want an api that is extremely lightweight. all I really need to do is set pixels, take mouseclicks, and output chars. I eventually want to put this program on a website. Which Api should I use?
-
Answer:
Dude, what you're talking about isn't even implemented in C++ (at least not that I know of). What this means is that any library that's implemented in C++ would probably not be easily ported to another system (kind of how ncurses is only on unix like OSs). There is no event handling in C++, the closest thing you have are called exceptions. Even if you do find an API that supports multiple operating systems, you're code would have to RECOMPILED on every machine that used a different kernel. This means unless you're planning on doing something open source (and including a make file) you're SOL. Plus the thing with the website? You'd have to use a CGI for that! If you want to do it the easy way, do this stuff in java. Not only does java have event handling (and inheritance applies here, so there are many types of event handling, from button to mouseclicks you've got it all) , but they support GUI controls (and the stuff impeneted in the swing library is platform independent, so your stuff will look the same across all OSs that support the JRE). Plus, you wouldn't even have to recompile your code, just spread the executable program around, and BAM, you have portable code. Java also supports applets so you can "put it on a website"
emacneil... at Yahoo! Answers Visit the source
Related Q & A:
- Which preposition should I use?Best solution by German Language
- How should I use Youtube API?Best solution by Stack Overflow
- How Can I use .net dll in C program?Best solution by Stack Overflow
- Can I use ajax to call c#?Best solution by Stack Overflow
- How to use GUI in c language?Which is best GUI for c?Best solution by Quora
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.