I’m learning C++ finally. Actually dedicating my time to it this time as opposed to skimming a brief booklet and saying I read it.
I found a great tutorial today that’s already helping me out. They did a great job of being able to hold my attention with stupid humor (mostly relating to Mexican Food) and have great examples, blah blah blah.
C++ Tutorial - if you want to take a look-see.
[edit]This tutorial is a beggining C++ from knowing Pascal, but even without knowing pascal you can learn easily.[/edit]
My question for you all is
Where did you learn C++ (or any other language for that matter)
What would you suggest to use for furthering my knowledge (besides experience, thats a given)
I learned just about everything I know from a book I read by Deitel and Deitel. It was called C++: How To Program, 2nd ed.
There is truly no substitute for practice, but if you want somewhere to start, my advice would be to grab some source code of a fairly simple project and try to read through as much as you can. If you want a challenge, try reading through some bigger stuff such as RoboEmu, which is written entirely in C++ (the windows version).
Also, as always, if you run into trouble or have any questions (which you probably will if you’ve never done pointers before), post here or email/pm me and I (along with several other people, I’m sure) would be willing to help.
I learned C++ from a class my junior year of high school and I keep in practice while learning more by competing on topcoder . This is a website with online programming competitions held about once a week.
I’m on my second year of learning Japanese.
Oh, Programming… Right.
Actually, I’ve been coding some stuff for GBA (Gameboy Advance) Lately. I’ve been using a combo of C, C++, Assembly, QBasic, You name it. It’s pretty fun, but its a little tricky to find a good compiler out there for free.
I kinda…uhh…just taught myself. Trial and error. And, well, much assistance from some IRC channels and my fav. C++ book: O’Reilly’s Practical C++ Programming. That is an incredibly nice book for anybody. I also have a few reference books on the shelf (stack, rather :)) including the C++ Black Book.
well, i tought myself a bunch of php, and know im in a c++ class in highschool. C++ is harder that php, fo sheezy. id rather program php cause it isn’t finikey and works the way i want it to most of the time.
I hate the gcc errors…it’s kinda like “there’s something wrong in your source…fix it” where in Perl, it’s more like “Hey…you have an error on line 53, there’s a problem with your curly brackets.”
i was supposed to take a C++ class last year, but not enough people signed up so it got dropped. then I took a Java class instead with the worst teacher I’ve ever had. Only learned where the java site is at.
*Originally posted by evulish *
**I hate the gcc errors…it’s kinda like “there’s something wrong in your source…fix it” where in Perl, it’s more like “Hey…you have an error on line 53, there’s a problem with your curly brackets.” **
What specifically are you referring to? gcc spits out line numbers just the same as any other compiler/interpreter. In fact, if you run it from within vi or emacs, the editor will even jump straight to the line it has a problem with. I’ve never spent more than a 30 seconds figuring out where the error was and I’ve been able to fix nearly all compile-time errors within a few seconds.
I know what he means with gcc, sometimes it can be alightly ambiguous, it gives you a line number eys, but doesn’t always easily explain what problem is. If it soemthing stupid, most people imply would miss it. Oh yeah and Sachiel7, how do you do GBA coding? Can you make cartitridges? Any links?
Well, Yes, you can load your GBA roms/compiled files onto your GBA. You need a few tools, but you can get a system to do it for under $100
Take a look at:
In the shop you can find the Flash Advance linker sets. Basically, It can rip the games from your carts, or load stuff to flash carts.
Since they vary in size, you can also put more than one game on each cart. Here’s something else a little fun to do:
Mabie you just aren’t getting the whole GBA Programming thing, so there is a “Morphing” section on GBXEmu that gives you tools to convert different ROM images to GBA Rom format. For example, you could convert the original Metroid ROM for NES to GBA, Load it onto a flash card with the Flash Linker, and then play it on your GBA. Nice, easy, and fairly cheap.
There are also versions out for other systems as well.
I tend to just surf the web, and get massive compilor errors. I did browse that deitle book awhile, but what really helped me was gasp VC++. As much as i dislike microsoft, the interface is rather nice. The compilor is another issue (i dont hate the compilor, i just have a few qualms about it). Also, big projects are a great way to learn. I taught myself OpenGL via a series of projects (ported SFCave from 2d palm screen to 3d win32, made pong clone, break-out clone, etc). From there i went on to make an mp3 player with crappy vis thing. Now i am doing winsock stuff. Key is to set goals. THat and visit nehe.gamedev.net, fmod.net and tangentsoft.net
I’m mostly self-taught. I just went out and borrowed a couple of books from the library and read tutorials from the Internet. Actually, if you want to know what makes learning easier, is to start learning, wait for a while (don’t know how long), and come back. I really think so, because I learned C++ in 2 “phases”: Once when I was 11, and again when I was 14-15, and now I think I can understand it pretty well.
C++ made learning everything else easier; I jacked a Perl book from a friend and learned it in 3 days. I guess you acquire some sort of “programming instinct”.
Oh yeah, I agree, VC++ really does have a nice interface.
Actually, I find programming in C++ is much easier than programming in PBasic. Reasons:
Unlimited Variables
Subroutines are easy to use
Other advanced commands make programming easier
and etc.
I learned to program in C++ last year actually. My sophomore year in Highschool. The only thing I don’t know in C++ would probably be Pointers. So if you need help, just ask. The instructor I had at the time just let us do our own work. Whenever we asked for help, he wouldn’t help us. So, most of the time we had to figure out the program ourself.
Another good website to visit is Devx. This site has references to all of the possible programming languages there is including C++, C, C#, Java, etc… It also includes downloads, a search engine, you can also ask questions, how to’s, etc… You may also join their mailing list for additional updates and help. It’s a great reference site and I hope that it will help you in learning C++.
books from www.hungryminds.com, Read Less - Learn More, but in reality they just explain how everything works and give you examples on all the aspects of the programming language. I highly reccomend these books…I learned C#, VB.NET, and ASP/ASP.NET from them.
I know BASIC and a little Java, mostly from working in a class and with Flash. On my job, I would have to figure out how to do things in Flash because my boss would present me with a goal of something that I didn’t know how to do, so I learned how to do it. Thats just actionscript, though, which is basically Java just implemented in Flash. I would recommend this strategy for languages, though. Figure out a project or something and go do it.
The class that taught me the most about how to write effective, reusable code was data structures. If you can find a team alum who took some CS classes or a book in the library, I would reccomend trying to work through the concepts involved.
The idea centers around applying a logical design to an abstract concept. An example is a Stack. A stack has the following properties:
It can hold 0 or more items.
You can only add items by putting them on top of the stack.
This is called a “push”.
You remove items by taking them off the top of the stack.
This operation is a “pop”.
Assume the following scenario:
PUSH A
PUSH B
PUSH C
temp1 = POP
PUSH D
temp2 = POP
temp3 = POP
Whats on the stack and what are the values of temp1, temp2, and temp3?
temp1 = C, temp2 = D, temp3 = B, stack = A
How would you write a piece of code to represent this behavior? How would you make it so you can push anything on the stack, regardless of its type? How do you make sure you don’t run out of space? Being able to translate this abstract description into workable code is a skill that will help you a lot, no matter what programming language you use.
There is a language called FORTH, which has been around in various incarnations for quite a long time.
I spent a couple of years programming in this language, but it’s not my favorite.
It’s stack based, so all operations are in “reverse polish notation” as used on the older HP calculators.
Example:
1 2 +
It’s often used where a simple low level programming language is needed. More advanced varients will do automatic type conversions as needed. One variant put strings on their own stack.
Correct me if I’m wrong. I remember my cs teacher making us convert an infix string into either of the two notations. I think (reverse) Polish notation is synonymous with the first 2? Anyway, to do postfix, you used a stack, and for prefix, you used recursion. (At least that’s how I did it.) Try doing it in C++, I think it’s a great exercise.
Oh yeah, I think the name PBASIC is deceptive because it’s not quite as basic as the other basics. Like the if-statements, for example…