Sign in to follow this  

Hello! Beggining with Dev C++

This topic is 3847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello, I am not totally new to programming, I have been "cheating" for a few years with DarkBASIC, but when it comes to C++ I am very much a green begginer! I have DevC++ and a few basic books on how to program using the console. I really want to get away from the console and perhaps move onto 2D graphics to begin with. I do not know what to use to do this. I gather I cannot do it with the basics that DevC++ provides. I downloaded Irrlicht, and managed to get to the BSOD (Blue Screen Of Death!!!) so I take it I am doing something wrong! I also downloaded Nuclear Glory, but to be honest I would be far happier if I could code in pure C++ as I don't want to "cheat" any more than I have to... I would really apprecitate anyone's help on my problem, a reference to a useful site/book would be great, or even a suggestion of which type of program I should start with. Your help is greatly appreciated! Thanks!

Share this post


Link to post
Share on other sites

Dev-C++ is a very poor choice for an IDE. It is old and dead; nearly every other IDE in existence has passed it by in terms of features, usability, and performance. In addition, it ships with an old GCC port and requires a host of specially-compiled or otherwise doctored libraries and headers, making it unpleasant to work with some of the more modern, interesting technologies out there.

I firmly believe that no self-respecting programmer should be using Dev-C++ any more. There are much better alternatives available: Visual C++ Express, Eclipse, Code::Blocks, et cetera. VC++ Express would be my personal recommendation.

As for books, Google for C++: A Dialog and Thinking in C++. They're both available online, and they're very good.

If you're ready to move beyond the world of console programming, you might want to check out SDL.

Share this post


Link to post
Share on other sites
I recommend getting Micsroft Visual C++ 2005 EE

From here, you would also need to download the Win32 PSDK.

Then, learn an API! SDL is good, as suggested. Two other common APIs
are DirectX and OpenGL--both of these are alot more complex then SDL
though.

After getting some experience in an API, try making a Pong or
Tetris game.

GDNet Books Section

I second Thinking in C++ -- very good book indeed.

Share this post


Link to post
Share on other sites
I agree that Dev-C++ itself is a bad choice... it really is old and dead---ish. However, there is a not-so-well-known project which is built directly off the old Dev-C++ base, with many new features and improvements. I just recently (a couple months back) switched from Dec-C++ to it. It is called wxDev-C++ and it, unlike the original Dev-C++, is under very active development.

Share this post


Link to post
Share on other sites
Hi;

An excellent book is Game Programming All In One, Third edition from J. S. Harbour. Is an easy to read, esasy to follow book. It covers 2D Game programming using the Dev-C++ IDE and the Allegro Library.

Another one excellent book is Beginning Game Programming, Second Edition from J. S. Harbour. It covers game programming using the DirectX libraries and Visual C++ Express edition.

Dev-C++ is just and IDE, I've been working since a long time with it and it has all I need, is just fine.

Share this post


Link to post
Share on other sites
I am just a beginner at game programming, but I use Dev-C++ mostly due to my limitations. I have tried CodeBlocks and its good. Its just a huge install.

With Dev-C++, you should install the updates or packages that you can get. They enable you start projects with different libraries.

I am using SDL and Allegro. Just install the package, and then start a new project. You can then start coding normally.

My only issue is the fact that I cannot debug programs. Besides that I think its pretty cool.

Share this post


Link to post
Share on other sites
you know what? i finally got confident enough with C++ to some advice i've gotten here and switch from DEV-CPP and you were right, i decided on codeblocks cause MS products act up on my computer, which means no visual c++. and code blocks is alot better, the auto formatting is better and so is the way projects work.


so yeah, thanks

Share this post


Link to post
Share on other sites
Thanks everyone!

You have given so much help and information. I will download codeblocks the moment I am at home.

I couldn't get the Visual Studio IDE to work as it needs to be installed on a PC with internet access. The PC I work on is diconnected, so I was wondering, is codeblocks a download like that, or can I download it and then install it elsewhere?

Thanks!

Share this post


Link to post
Share on other sites
Quote:
Original post by Lewis
I couldn't get the Visual Studio IDE to work as it needs to be installed on a PC with internet access.


Download the whole image (was like +400 megs or so) and burn it.

Visual Studio Express is the best free IDE available for Windows.

(KDevelopment or Emacs is the best for Linux). ;)

Share this post


Link to post
Share on other sites
Thanks again for all your help everyone. I am downloading Code::Blocks as I write this.

Sorry to sound like like a fool, but I have not ever heard of an API before... I took a look on wikipedia, and I get the idea that an API is just an extra set of "commands" for C++? Is that right?!

Your reccomendations towards SDL seem inviting, where can I get it from? Does the download include help files and command lists?

Thanks again for all your help! I cannot beleive I am finally on the road to writing visual programs in C++!

EDIT: WOW! I love code:blocks! It seems that my old way of outputting data to the screen () in the console using:
cout << "blah text here...";

doesn't work anymore. This is a bit confusing as code:blocks seems to want something more complicated now. Any ideas why? Is it just different syntax from one compliler to another? Or am I # include ing the wrong file? Thanks!

Share this post


Link to post
Share on other sites
I believe the SC++L that ships with Dev-C++ pollutes the global scope with "using namespace std;" if you include the old-style headers (e.g., iostream.h instead of iostream). Or perhaps it always does it.

In any case, that was wrong. Unless you explicitly place a using directive or declaration someplace, you should prefix cout and other SC++L identifiers with std::.

This is legal C++ and should compile cleanly

#include <iostream>
int main()
{
std::cout << "!";
}

(yes, it is perfectly valid to omit the return statement here, but only in main(); the effect is as if "return 0;" was used instead).

Share this post


Link to post
Share on other sites

This topic is 3847 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this