Before I sit down and learn C++

Hello programmers.

I'm a veteran PHP/HTML/CSS... programmer, and I'm looking to make a program that runs on the computer to compliment the functionality of my website. I have no idea what C++ is capable of so I would like to present my vision to you and hopefully get a response as to if this is possible to accomplish with C++.

The program:
I want a program to run in the background of another program say a full screen game, preferably with some kind of UI making it possible to change setting when not inside the game. The program should be monitoring for key presses F1-F12 while inside the game, and after say 10 seconds make a sound.

So I'm playing my game and I press F1. After 10 seconds the program says "10 seconds have passed". If i press F1 followed by F2 it says "10 seconds have passed... 10 seconds have passed".

Is this accomplished with C++ or should I run some other language?
Does C++ programs work on the Mac/Linux?
yes, you can do all that and more. There's nearly no limit.

This freedom has its price: It's not that easy to learn.
A project of this size how advanced would this be? I'm willing to spend 6 months to a year of training into this project. Would that be sufficient?
C++ programs (written in portable code) can be compiled on windows and linux, I don't use any apple computers so I don't know if you can compile C++ on Mac OS (I assume you can), I hear apple programs are mainly written in Objective-C

When you say you want to create a program to run in the background of another program, I assume you're talking not about coding the actual program (game) or w/e also. To change settings for the game via some .ini file or something should be fairly elementary, however I've never actually done something where my program monitored key input for a different program. I don't think it would be TOO hard. This is definitely possible in C++ though.

I'd say 6 months is more than enough time to learn how to do something like this.

edit: after a quick google search, it appears this would be done by using windows(or linux etc) code and monitoring the raw keyboard input on the OS level
Last edited on
Thank you for the info huike.

One more thing I would like to ask.

What program should I use to program and compile my projects. Atm I'm using dev c++ but I can't get boost to work with it.

I've run into a problem where I need to run multible wait function to play multible sounds after the wait timers run out but that means that I need to use asynchronous programming. Is there a book that covers this topic and basic c++ programming.
You can definitely compile C++ on OS X:) g++ comes with Xcode, Apple's own IDE.
Thank you for the answer fafner.

I'm very new to C++ so if you can explain a little more about what you just wrote I would greatly appreciate it, as I didn't understand much of what you wrote :).
np:) g++ is one of many free compilers for C++. Apple's own developer tools, XCode, can be downloaded for free from the app store, and that will install g++ for you, among other things. If you're using a mac, I would recommend getting XCode.

EDIT: If you're on Linux, there's a good chance g++ is already installed on your system. To try this, open a terminal and enter g++ :)
Last edited on
I'm running a windows 7 system. Will G++ run on that?
I hardly have any experience developing on windows, but I know that there's a project called mingW, which has ported g++ to windows.
If you're using Windows you won't be able to use XCode (there are dodgy workarounds though), so you don't really need G++. Visual Studio 2012 or Code::Blocks are more friendlier. The latter will need setting up, so it might be easier to get VS2012 so you can jump straight in for now.

I hardly have any experience developing on windows, but I know that there's a project called mingW, which has ported g++ to windows.


Yeah, that's what I use with Code::Blocks.

@OP, are you sure you can't do what you want with web code? This seems like an awful waste of time to learn if that's all you want. All learning C++ is useful, period. :)
Last edited on
Codeez the thing with web based applications is that they do not have accessibility to key monitoring unless you focus the explorer.

This would mean that you need to have the explorer i.e firefox open and focused in order to make a key stroke. So the game would have to be minimized or unfocused for the key stroke to be seen on the web based application.

With something like c++ what I've understood is that you can monitor key strokes even without having the program selected. So you would be able to play the game while pressing F1 and the c++ application would still register the key stroke.

Correct me if I misunderstood the information about c++ applications wrong as there aren't a lot of concrete information about my project goals on the internet because of the sheer size of the functionality of c++.
Topic archived. No new replies allowed.