Qbasicnews.com

Full Version: C!
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Quote:Bloodshed Software's Dev-C++. I've enjoyed using it, and it will compile DOS

I dont think so on that one, DJGPP compiles DOS programs, dev-c++ does not. Dev C++ compiles windows consoles, eg text only things and do not properly support many dos functions like conio.h among things. Its only there for backwards compatibity.

There might be a way to get it to compile in dos however, as DJGPP and dev-c++ both use the gcc compiler, but im not really sure on that one. i think there seperate ports, as DJGPP has random() as well as rand(), but dec-c++ does not.


Quote:I've heard that many c/c++ games is made with some allegro
library and/or djgpp compiler... Is that good? can you use allegro on another compiler than djgpp?
*sigh* the whole point of allegro is so that it will work on many different OS's and compilers....

Itll work with msvc, devc++,djgpp,and borland(very buggy) on the windows/dos side. It also workds under linux, and a little for the mac.

http://alleg.sf.net //official page
http://allegro.cc //game depot,probably best allegro site,down right now


[edit]
Well might as well promote my game, i did this for a christmas contest, it uses allegro and was compiled both with dev-c++ for the windows .exe and djgpp for the dos version, both are in the download.

Get it here: http://stars.hybd.net/games/ponguc.html
Compiler: gcc
Debugger: gdb
Editor: xemacs
Aditional tools: GNU

The whole lot are cross-platform, free, open source and very nice to work with (IMHO). I dont really use libraries with C because most of the coding I do with it is very low level stuff ;-)

I really do not like C++, it is a horrible language that attempts to take the best of C and OO programming and mash it all together. It has a poorly designed syntax which causes problems and all other sorts of nonsense. Java is a far better designed language, and you can get compilers for Java to produce OS specific object files rather than VM byte code.

As for the random()/rand() issue, rand() conforms to SVID 3, BSD 4.3 and ISO 9899, while random() only conforms to BSD 4.3. So I would go with the rand() family to ensure a high level of portability, although random() returns a long int, whilst rand() only returns an int.
Pages: 1 2