Software C++ Beginner tutorial?

You'll still need some basic C++ knowledge to make Orbiter addons so it'll be a good idea to finish going through the tutorials on that site. The Orbiter SDK guide and reference is a nice place to start making Orbiter addons and so are the examples in the samples folder of the SDK.
 
Thanks for all the help guys, after getting into it a little I'm starting to notice it isn't so different from the BASIC I'm used to after all. (In certain ways anyway :P)
 
I recommend you learn Orbiter addons by hacking around with the samples that are included with the SDK. There are also a bunch of open source addons that you can play with the code for too.
 
You could try adding system("PAUSE"); before the return 0 that should stop it closing until you press a key. it's probably not the best way to do it but it works fine :thumbup:
Unportable solution and a bad practice to use system() freely. Use getchar() instead.
 
Unportable solution and a bad practice to use system() freely. Use getchar() instead.
You can also set a breakpoint at next instruction after "cout", or step through the code of your program. A good practice for debugging your further programs / Orbiter add-ons.
 
I started C++ here:

http://www.cplusplus.com/doc/tutorial/

...and while I'm far from expert, I found that it was a great start. I started with the intent of making Orbiter addons, but I still haven't made one! I have made some programs which use Win32 (windows and graphics library) which is also very fun. Here's a tutorial for that, once you master basic C++:

http://www.winprog.org/tutorial/

The best way to advance up the ranks is to look at source code from other programs, and make small changes to get an idea of what they do.
 
Why do I need to use Visual C++ specifically?

Because most people use VC++2005/2008 to code Orbiter addons, and you'll have a hard time following the tutorials on a different software with a different interface. It's possible to use another, but that's extra work IMHO. Also there are problems of compatibility as said above. Martins used VC++, so its safe to stick with it.

I strongly recommend you to follow that excellent tutorial from Computerex, that sums up in a very complete way how to set up VC++ and start coding :


I also recommend his other tutorials, which cover the basics you'll need.
 
I strongly recommend you to follow that excellent tutorial from Computerex, that sums up in a very complete way how to set up VC++ and start coding.
I just watched that tutorial for the first time. Some points I noted:
  1. For development purposes the best is to leave Orbiter 2010 shutdown option the default or set it to "De-allocate memory and display launchpad dialog" if it's different. This will allow you to find bugs and leaks appearing in your modules when simulation is closing, or some bugs that are only present when you rerun the simulation with this option selected.
  2. Setting the include, output, library paths is deprecated. The best is to set Orbiter directory in "Orbitersdk/resources/orbiterroot.vsprops" and use either "Orbiter vessel.vsprops" or "Orbiter plugin.vsprops" property sheets from that folder, depending on what type of module you are writing, as inherited property sheets for the project (and additionally "Orbiter debug.vsprops" for debug mode).
  3. You don't need to add Orbiter.lib and Orbitersdk.lib to project, or ignore msvcirt.lib either. Orbiter libraries are added to additional dependencies by inherited property sheets you selected in the previous step, as also msvcirt is added to ignored libraries there too (you might only add msvcrt.lib to ignored libraries if switching from dynamic to static build didn't deactivate it by default).
  4. If you add an additional library, it's better to add it to additional dependencies (with additional library search path if needed) than to the project files.
 
Back
Top