Marty
Marty

Reputation: 39466

Learning C++, What's next? Also what's a recommended compiler?

I've been spending my "inbetween" time at the office looking into C++. I'm primarily a flash & web developer, also working on a bunch of flash games, but I thought it was time to have a look at some non-web-based languages and see if I could get some real games going.

I've got the hang of how typing works, arrays, outputting using cout, structs, classes and so on and so on.

I seem to have found myself stuck in terms of what I can do next. Outputting to a DOS window obviously isn't that exciting - how do I get started on doing something graphical? A square moving around on the screen, even. Simple is better in this case.

As for the compiler - I've been using devcpp by Bloodshed; is this adequate or am I missing a more common compiler somehow?

Upvotes: 1

Views: 210

Answers (4)

StackedCrooked
StackedCrooked

Reputation: 35545

Some tips:

  • Work through one or more good books. I recommend "Accelerated C++" and "Effective C++". These books will teach you real C++ programming.
  • If you're on Windows then I think you're better off using Visual Studio. The learning curve for C++ is steep enough already. If you simultaneously need to learn how to work with gcc and makefiles then you are likely to become overwhelmed.
  • Windows specific: for simple graphics I find WinAPI and GDI+ useful. They are relatively easy to learn and they are immediately available.

Upvotes: 1

BjoernD
BjoernD

Reputation: 4780

Have a look at graphics and windowing libraries. For windowing, as you seem to be on Windows, there's builtin stuff. For more general applicability I suggest having a look at Qt or Gtk.

For graphics, the fancy stuff is usually done in either DirectX (basically Windows only) or OpenGL (more portable).

Compilers: GCC is commonly used in the Unix/Linux world and also available on Windows through Cygwin. In the Windows world you'll also find Microsoft's MSVCC as it comes with their development tools. Btw., there are free dev tools from Microsoft as well, see their Visual Studio Express Editions.

Upvotes: 1

jiman
jiman

Reputation: 270

For a compiler, my school uses g++, an excellent, free C++ compiler that is compatible with many IDEs for unix-based C++ development. If you're running a windows machine, you'll have to download cygwin (which emulates a linux shell) - you'll have to select which executables you want to download with the cygwin shell, figuring out what items you need may take a little time (basically, download useful looking things for the type of development that you want to do; g++/gcc are very important).

http://cygwin.com/install.html

When you have this, you can easily configure netbeans or eclipse (I've had better experience with netbeans) to compile and run your C++ code through cygwin.

Also, my favorite resource for learning C++ has been cplusplus.com - it has detailed tutorials of all of C/C++'s standard functions.

Hope this helps a little!

Upvotes: 2

pickypg
pickypg

Reputation: 22342

Graphics can be done using DirectX in Windows, or OpenGL on every platform. It's a whole different discussion upon which to choose.

In addition to trying to work with graphics, you could try your hand at developing GUIs. I'd give Qt a shot. Be warned though, Qt is being sold by Nokia, but it's overall a very well known and heavily used framework. Or try direct Win32 (not necessarily something I'd suggest unless you're interested). Or try WinForms (requires .NET experience, and steals from the true C++; C++/CLR is NOT the same C++ you are learning--it adds to it). If you do go the .NET route, avoid "Managed C++" examples, as they that was the first iteration of C++/CLR, and they simply redid it and vastly improved it.

Two most common compilers: gcc (Linux, Mac and Windows) and Visual Studio's for development on Windows', I always use Visual Studio (there is a free version called Visual Studio Express that is a solid product) for Windows development simply because I love the IDE.

Upvotes: 2

Related Questions