-
C++ help
Hey guys:
I've been studying programming on-and-off for almost a year now, so... I'm a total newb. I need some help. I was wondering if u guys had any suggestion on a good C++ book I could get
Also, part of the reason I'm not "getting it" so fast is that I cannot practice on a compiler (all the freeware one's I've gotten are crappy). It's always some stupid technicality with the headers (one's not present, not working, won't compile, ect..ect..) Do you guys know of any easy one?
-
Eh, the gnu compiler for C and C++ is free....you need to run linux though, I dunno if you can run it under cygwin, I don't think so, but I may be wrong, probably am. I use both gcc and VC++, the VC app cost a few bucks, but I got it at my college's bookstore at a discount...compilers are funny...some will require a '.h', and some won't...some will need you to use std, and some won't...some will accept iostream, and some want you to use 'primative', older methods...I do remember a thread on DJCPP, though, might want to search for it, I think it's free. As far as books go, everyone has their preference of course, I like Jamsa's programmer's bible....it covers C and C++, and lets you see the difference, and advancement of the compiler....it'll set you back about 50 bucks, but imo, it's worth it....it comes with a simple compiler as well...otherwise, you can always download perl and play with it, you'll still learn the basics structure of things...
Heh, actually, looks like cygwin comes with gcc, my bad...
-
Actually, a good compiler to get for Windows is Dev C++. You can get it at http://bloodshed.net . It uses a Windows port of the GCC compiler called MinGW. That's the one I use if I'm on Windows.
Cheers,
cgkanchi
-
AFAIK you can use gcc under cygwin, one of the purposes of that... software suite [cygwin, for lack of a better term] is to be used to test cross-compatibility. Unfortunately most of the books I've seen out there on C/C++ tend to be windows oriented. For the beginner level that should be okay, many of the basic functions are ANSI standardized. Btw google for 'SANS institute', I've found a whole PERL book there free for DL so you might be lucky for C aswell.
As for compilers I used to have Turbo C++ under Windows, it's a pretty old compiler [last edition is free for DL from the Borland archive] but it is really helpful for newbies, as it as all the functions in an online help [ctrl+F1]. As you progress Dev C would be the best free alternative. VC is good if you're intending to develop Win apps, Qt if it's Linux [Gnome I think? or was it KDE?]
-
http://www.freeprogrammingresources.com has links to books, Tutorials, Source Code, and compilers.
-
Man, I swear to you, find a used computer store near you, get any cheap computer that they have ( I can guarantee that they have one under 150, just ask for cheap.) and get any linux distro you can. If you really want to learn C, learn C in text prompt first. gcc is da' bomb! IMHO, of course :D
-
Hi, I totally agree with mungyun. Install linux and start C programming using gcc you will learn lots more this way. C is tough, but it lets you do many things. From all the C books out ther I found that "Practical C Programming " by Steve Oualline published by O'Reilly is one of the best.
Programming languages all have thier own cult following but IMHO for OO stuff you should go ahead and learn Java instead of C++. Don't get me wrong C++ is still very useful but I reckon Java opens the door to other stuff like applets, jsp, etc.
hope it helps,
J
-
Yes I do agree with all of those guys with all that programming terms i dont know. I too am a newby programmer but when i found out about the $5,000,000 reward for information leading to where a virus was made i took security more serious, but when i was learning programming the best thing for begginers I THINk is Microsoft Vusual Basic and thats because of all the information it gives you, IT CAN ReALLY HELP, and there are alot of buttons to play around with so it can make really decent begginers programs and plus C++ is EXPENSIVE!
-
If you run linux using kdevelop and ddd is fine.
As far as books go,
'The C++ programming language' by Stroustrup - http://www.amazon.com/exec/obidos/tg...books&n=507846
And,
'The C++ standard library, a tutorial and reference' by Josuttis - http://www.amazon.com/exec/obidos/tg...books&n=507846
are the way to go.
I totally disagree with learning C first. While it was the first language I taught myself, I've had to test and maintain enough C++ code written by other people who started with C that I'd never recommend it to anyone. It has been some of the most poorly written crap that I've ever seen or dealt with. C++ is fine as a first language, just take the time to learn good coding practices.
Another book I'd recommend for that is,
'The Practice of Programming' by Kernighan and Pike - http://www.amazon.com/exec/obidos/tg...glance&s=books
And,
'Core C++, a software engineering approach' by Shtern - http://www.amazon.com/exec/obidos/tg...glance&s=books
-
You cannot say that C++ is expensive because it is just a programming language. Some compilers for C++ may be expensive, but the language does not cost anything. That's like saying that english is expensive because there is a certain english class that you can go to that costs a lot of money.
If you need a C++ compiler, first people really need to know what operating system you are running before they can make any suggestions. In this thread there have been suggestions for more than one os, so that is not so much a problem for you, but in future, tell us what os you are running.
If you are running any windows operating system then I would recommend bloodshed dev-c++ (available from http://www.bloodshed.net as someone else said above), and if you are running a unix based operating system, I would recommend gcc (for c) and g++ (for c++). You would normally have these installed in any case.
Dev-c++ itself isn't the compiler, it is an IDE (Integrated Development Environment) which is basically a text editor that will carry out many of the tasks needed to compile and run your program without you having to do them. For this reason, I think if you aren't used to using consoles (like the linux console or dos-prompt) I think you should head over to bloodshed.net.
Hope that helped.
ac
-
Thanks guys!
Oh, and Linux software isn't a problem: I use a windows for the net, but I also have a double-boot Red Hat (use it to mess around with)
-
Quote:
Originally posted here by djplaya216921
Yes I do agree with all of those guys with all that programming terms i dont know. I too am a newby programmer but when i found out about the $5,000,000 reward for information leading to where a virus was made i took security more serious, but when i was learning programming the best thing for begginers I THINk is Microsoft Vusual Basic and thats because of all the information it gives you, IT CAN ReALLY HELP, and there are alot of buttons to play around with so it can make really decent begginers programs and plus C++ is EXPENSIVE!
IMHO when one's beginning to program one should aim at something less.. specific. Sure there are software ports and whatnot, but VB is too windows-oriented for my liking. C/C++ and Java have the advantage of being useful in a number of different OSes. But.. that's just MHO.
-
I would also recommend bloodshed.net's Dev-C++. I think it's great. It was actually written in Delphi. Delphi is a language that isn't really too hard to learn and get good with for most.. and it has flexibility. I don't know of one other OOP language that can spit out an app as fast as Delphi (Object Pascal) can. I've been programming in Delphi for around 2yrs now (including Kylix for Linux). Just started about 1 year ago with c++ and some x86 asm about a year before that. I wouldn't waste my time with VB (including VB.NET).. but that's just me.
-
Ok, I'll bite on this one... Here is my list of recommended books (in order) to the C++ newbie. :)
Book 1) C++ Primer Plus, Stephen Prata,
Book 2) Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions, Herb Sutter
Book 3) More Exceptional C++, Herb Sutter
Book 4) Effective C++: 50 Specific Ways to Improve Your Programs and Design, Scott Meyers
Book 5) More Effective C++: 35 New Ways to Improve Your Programs and Designs. Scott Meyers
Book 6) Effective STL: 50 Specific Ways to Improve Your Use of the Standard Template Library, Scott Meyers
Book 7) Generic Programming and the STL: Using and Extending the C++ Standard Template Library, Matthew H. Austern
Book 8) C++ Pointers and Dynamic Memory Management, Michael C. Daconta
It is a good idea to pick up a pure reference book on C++ and STL at some point as well; but they will serve you better if you grok C++ beforehand.
-- spurious
-
GCC/G++ is obviously the choice for Linux. All you have to do to compile your program is:
gcc -o test test.c
or for C++:
g++ -o test test.C
For Win, the previously mentioned ones will do fine. I don't think I saw Digital Mars mentioned though: www.digitalmars.com. That's what I use for windows anyways.
Have fun :)
mjk
-
C++ for Dummies is the best way to go. It will teach you all the technical terms in a way a newbie can understand.
-
-
Since many of you are probably running Linux on PC's, the *free* unsupported version of
Intel C++ 8.0 compiler collection may interest you.
You can check it out at http://developer.intel.com/software/...lin/noncom.htm
(I run this tool-suite with the Eclispse IDE with the CDT module for C/C++ on my Linux projects, both at work and in my personal research. Instructions for doing this are at http://developer.intel.com/software/...cs/eclipse.pdf )
Intel also has some really great documentation on programming for the PC, be sure and skim over what they have for free at developer.intel.com.
-- spurious
P.S. the 'unsupported' non-commercial version of the compiler _is_ the same as the 'commercial supported' one, but you can't sell anything you build with it, and intel won't offer any hand-holding like they will if you pay them for it.
-
As you can see, resource availability is not an issue. And having not read all the posts, I don't know if any online resources were mentioned as well. The internet is packed with C++ tutorials etc., and your RH came with a good compiler and we can help you with that. But I don't believe that may be the hold up. :eek:
Quote: "I've been studying programming on-and-off for almost a year now, so... I'm a total newb. I need some help. I was wondering if u guys had any suggestion on a good C++ book I could get"
The only problem I see is with your "on-and-off". That may work well with sex, but you might stay "a total newb" if you can't devote more time to studying. I believe it is really hard to learn a language effectively using this method. I tend to forget and have to relearn things over and over if I only do it ever-so-often.
So "Turn-To" on it mate!
:cool:
-
I am not very smart and tried a couple of programming books, and it still wasnt "going in". So a friend gave me C++ in 24 hours. After about a week it gave me a good base. A few years ago I used C for dummies it is a bit basic and childish but you will learn the basics.
As for Compiler, the best and most powerful I have come across is Kdevelop availible on Linux KDE. It has so much you would not believe.
-A-
-
i agree with gothic_type the u should use the gcc or g++ compilers with linux and the other one for windows..
-
Book and Compiler
I took 5 semesters of C++ in school and I used a microsoft compiler the entire time but at home I have been using a Borland v.5.0 which works like a charm as well as recently getting a C++ book to refresh myself called Wiley's Teach Yourself C++ by Al Stevens. So far it has been pretty informative.
-
Thanks guys, your responses really helped. I am currently back in the programming vibe, he.