Sunday, July 12, 2009

C++ programmers wanted!?

Ok, I'm new to C++ and programming and have a n00bie question!Ok, I'm using Dev-C++ for my programming and I'm wondering why all the programms I write come out in a DOS window! Is there another compiler I can use to make it windows 32 bit? I know that Visual Basic makes windows programs but I don't wanna learn the Visual Basic language I wanna use C++!!!( this is because I'm a game prgrammer!) So is there any windows compilers out there I can use!!!???

C++ programmers wanted!?
Any C++ standards compliant compiler is going to "come out in a DOS window". At least by default. It's not a "DOS window", it's a console. The C++ standard does %26lt;b%26gt;not%26lt;/b%26gt; specify any sort of GUI; only simple text stream and disk i/o.





If you want a GUI, you will have to link to the appropriate libraries and use the API.
Reply:You could use Microsoft Visual Studio 2005 Express: C++


http://www.microsoft.com/express/vc/
Reply:In order to make Win32 based applications you need to get a library which can draw windows and stuff. Do a bit more research on this and you will find many libraries. MFC (used in visual c++) is just one such library.
Reply:Well the reason you are getting a simple command window is due primarily to how your project is setup. By default applications will be launched as a simple "DOS" window.





If you are new to game programming I recommend you google for OpenGL or DirectX tutorials. They will guide you through the process of setting up windows and game development.





Btw, I use Visual Studio 2005 Express C++ for my game development. It works great and is free.
Reply:I'm on Linux. I haven't used Windows seriously in years. In essence you are using the same compiler I am -- GCC -- in the better of two Windows ports. This one has a Windows library. You use windows.h and set up your project to link to the relevant libraries. In sources I've linked to a page about setting it up.





The thing is, just because you're fed up with the console doesn't mean you have a good enough grasp of the language to pop your program onto the desk-top. If you understand namespaces, scope, pointers, objects and methods well enough to do a linked list, fine. There are tutorials on writing for Windows all over the web, and some of them have Dev-C++ specific features.





But if you try to run before you can walk, all you'll be doing is setting yourself up for a fall.
Reply:try visual c++ express - it's free .... Microsoft gives this to everyone trying to learn windows programming - not a trial copy.





http://www.microsoft.com/express/downloa...


No comments:

Post a Comment