PDA

View Full Version : Intro to comp science using C++ (Now all I need is a compiler...)



punkonjunk1024
11-23-2004, 07:14 PM
Yeah, basically, as above. I got a teacher to give me an outdated C++ book, and the data files for it. (Files, of course, stored on a floppy O_o )
So.. This is still a useful book, its not like anything is outdated except the book itself. and its only 98, so its not too bad. The only programming languages they teach at my school are Visual basic, and Java. I'm learning Java next semester, but I'd like to learn C++, so can anyone tell me where I can get a compiler?

jman2050
11-23-2004, 07:16 PM
Google->GCC, Mingw32, DJGPP, etc. If you want a decent free IDE get Dev-C++. And whatever you do, try your best to do as little VB work as possible. THe language will teach you bad programming habits.

Ganonator
11-23-2004, 07:20 PM
Those are great compilers, but if you are going to use a finalized version of anything, make sure you grab the Microsoft Visual Studio 7.1 command line compiler (http://msdn.microsoft.com/visualc/vctoolkit2003/) as this is what you'll need for any serious projects.

C++ hasn't changed for years, so having a book and code from 1998 isn't going to hurt you at all. Good luck!

punkonjunk1024
11-23-2004, 07:39 PM
That was really, really fast :P
Something specifically created by microsoft would be what I would trust the most, but will it cost me any money? I guess I should be specific, I'd like something fully funtional, and FREE.

And thanks, gannonator.
In a few years I might actually be good at this :goofy:

EDIT: Yeah... I checked on the Microsoft toolkit deal... Uh... 31.1 MB. On a dialup... I think thats gonna have to wait for tomarrow.

AtmaWeapon
11-23-2004, 09:52 PM
And whatever you do, try your best to do as little VB work as possible. THe language will teach you bad programming habits.

*ahem*

VB .NET developer speaking here, and you are only correct about VB6, you'll have a hard time convincing me that VB .NET is not OOP. VB .NET was redone to make it fully OOP and to get rid of its nasty little things that made it the joke of the programming world. In fact, VB .NET changed so much from VB6 that the most hard-headed VB6 developers have dubbed it "Visual Fred" because "it's not really VB". Yeah, whatever. These kids can keep fighting progress, the grownups have applications to develop. VB .NET 2005 has some features added to ease the transition from VB6, and most of the bug reports on the beta forums are nothing more than "DON'T YOU DARE PUT THAT FEATURE BACK IN!"

In fact, VB has changed enough that hopping between VB .NET and C# is just a matter of remembering to use {, }, and ; a lot more. VB .NET 2005 introduces lots of new language features with spiffy new Microsoft names, most notably templates (MS calls them "Generics") and operator overloading.

That aside, VB is a tool with a purpose. That purpose is rapid development of business applications. C++ has a purpose as well. That purpose is development of applications that require low-level control over the underlying system, high levels of optimization, and anything else that really needs to be in assembly but is just too hard to do that way. Java has a purpose as well. That purpose is to be a very good learning language with lots of API support that will make your CPU cry and your RAM disappear, all to produce "Hello World".

Out of all three languages, C++ is the most versatile. However, it is also the most difficult. Lots of schools put Java and VB as their learning languages now, but I strongly believe you should learn C++ first. If you can get C++ and produce good results with it, you should be able to learn nearly any language.

This is a point I argue with people a lot, but I think it's best to learn the hard way and then move to the shortcut. You cannot appreciate .NET' or Java's "an object is pass-by-reference unless you do this" functionality until you've dealt with C++ pointers. After the nightmares of forgetting copy constructors, freeing memory that was still referenced, not freeing memory that was no longer referenced, and many other pitfalls of C++, I really appreciated the under-the-hood stuff VB .NET did.


ANYWAY, on topic now, the compilers mentioned so far should work fine. Be prepared to look in their documentation a little, as your book may have some minor syntactical differences from what the compiler wants. It is my experience that the MS compiler does not do things the way the GCC does.

With respect to the courses in school, man I'd have killed to have programming at my school. Take both classes if you can, but heed this advice: If the VB course is VB6, take Java first. When you take VB6, take it with the understanding that as much as I hate Java, you will do MUCH better to program with Java than with VB6. However, there's lots of legacy VB programs out there that will probably cease to function on Longhorn. This means there will be a need for programmers who can do VB -> VB .NET. I guarantee you if you can code in Java, C++, and VB6 you will have no problems moving to whatever language you need* (though if it's VB .NET there's a bonus, that puts you closer to C# and .NET IS Windows programming, as far as Microsoft is trying to push it).

*Except Perl. Perl is a beautiful, fantastic, god-like language that has very little bounds on what it can do. However, "there's more than one way to do it" is the motto of Perl, and there is no "way" to write Perl code. It's not hard to write Perl, but it's dang tough to read other people's code if they don't comment (Real Perl programmers don't comment. It's an honor thing.)

jman2050
11-24-2004, 09:18 AM
Heh, I find Perl to be very powerful, if not a bit cumbersome (but hey, I don't use it much. My forte is standalone programs, not web-based interface). As for your comment on VB, while I understand the potential benefits of using the language (and, to be fair, I use VB exclusively when I need to make a quick application without wanting to worry about memory management and such. It's very good for that purpose) But my point still stands. VB DOES teach you bad programming habits if you rely on it too much, but I guess you covered that by suiggesting you learn C++ first. Thanks for your opinion, I'm sure punkonjunk will find it useful :P

Tsukuru
11-24-2004, 11:42 AM
I agree with jman, you should get the Dev-Cpp IDE from bloodshed.net (http://www.bloodshed.net/download.html). What I liked about Dev-Cpp is that it's free, and easy to use. You can simply load up source code and compile, whereas with Visual Studio you have to create a project first.

When you get into college and you're still interested in programming, try to see if your college offers student versions of Microsoft software through MSDN. I bought a student copy of Visual Studio .NET for about $15 (along with XP Professional for $10).

It takes a little work to get used to the environment, but in the end it's worth the useful features. Dev-Cpp is great, but it has its bugs. I've used C++ .NET for a few months now and the only run-time errors I've encountered are ones I generated myself :)

punkonjunk1024
11-24-2004, 02:01 PM
I'm downloading Microsoft visual toolkit right now... Er, my teacher is DLing it off his T1 connection to my usb drive for me :D
...Can anyone explain to me why I would want Dev-C++ over MSVT?
I'm still basically programming illiterate, I learned VB with microsoft visual basic :P

Dark Nation
11-24-2004, 03:14 PM
ZC is compiled with DJGPP (for the DOS port) and MinGW (for Windows). The IDE used is MinGW Developer Studio. Originally, the DOS IDE was RHIDE.

punkonjunk1024
11-24-2004, 07:09 PM
So, would you say any of the above would be more user friendly than microsoft C++? From the POV of someone just starting the language.