learning C++

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
guyofcomics
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 53
Joined: Wed Apr 09, 2008 12:33 am
Contact:

learning C++

Post by guyofcomics »

Okay, a while back, probably a year ago, I purchased a book, LEARN C++ IN 24 HOURS. Now, as of yesterday, maybe the day before I am reading the book and working hard to learn C++ programming in order to make video games. I also have both a few Macs and P.C.'s, so that is a good thing. I can learn to develop for both platforms.
Any thoughts/tips?
Go Bears!
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
Posts: 10294
Joined: Thu May 20, 2004 2:04 pm
Current Project: Elysian Shadows
Favorite Gaming Platforms: Dreamcast, SNES, NES
Programming Language of Choice: C/++
Location: Studio Vorbis, AL
Contact:

Post by Falco Girgis »

My only advice is to stick with it and take it slow. I usually suggest something like BlitzPlus to people with no programming experience as a first language.

C++ is a very intimidating language to start with, but it's definitely possible. I started with it, but it took me a very long time to get good or do anything worthwhile.

I don't think that people have any idea what it involves. Our current project here is not the first thing I've done. I've worked on a 2D shooter, 2D Platformer, and a Dance-Rhythm game. All of those projects were scrapped, but they were actually pretty near completion.

It has taken me almost 5 years now to get something worthy of showing to people. This doesn't happen overnight.

Just don't forget that.
guyofcomics
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 53
Joined: Wed Apr 09, 2008 12:33 am
Contact:

Post by guyofcomics »

i've never even heard of blitzplus. I'm already 2 chapters of 24 into the C++ book and am working hard with it, so I think I can do this pretty well. I don't understand how editors (like Marcell's), and platforming and all that, but I won't worry about that until I have C++ down.
Go Bears!
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

I started out with Visual Basic, myself.

You won't really ever get C++ down, but you can learn the basics and techniques. The thing is there's always something useful you need and then there are useful things that go with that. Like GV is looking to implement Lua in the game, but it only works easily with C, so we found a template package that makes it work better with C++...

Heck, after almost a decade of programming, I still don't know some standard things about C++. Like, I can't design a template yet. I'm not exactly sure what typedefs are for. I don't know what all is included in the STL. I'd never even heard of a heap until my algorithm design class this semester. Stacks and BST's, yeah. Priority queues are another thing I just learned about -- a queue that isn't FIFO, but rather sorted by priority tags on the data.

Anyway, I recommend picking up some projects to work on as you learn and implement new techniques that you learn along the way. Also, research new things to do what you want -- if you're going "Gosh, it'd be nice if there were a thing that could...", then there probably is. I came across vectors this way while looking for dynamically resizable arrays, as well as the getline() fn for C++ strings (which turned out to be broken in my version of MSVC++ and I had to fix it through some internet instructions :P)

Re: Gyro's comment on "amount of work"... I've spent about 3 years and around 25,000 lines of code -- at least, that was the count at year 1.5 -- making what basically amounts to an online text adventure (MUD). But then my HD failed and I didn't have an external backup =(

To get back on track: throw yourself at a myriad of book and web sources -- since there's so many things out there about C++, most things will take a different focus, or at least a different approach to solving a particular problem. In short, don't be afraid to pour a lot of effort into looking to see if someone else has solved your problem already so that you don't wind up reinventing the wheel.

Moral: Programming involves a lot of learning. A lot. And a good amount of challenge too :)

And that's the advice I have for you =) Good luck (don't be a stranger!)

(Edited)
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Arce
Jealous Self-Righteous Prick
Jealous Self-Righteous Prick
Posts: 2153
Joined: Mon Jul 10, 2006 9:29 pm

Post by Arce »

My advice: If you're going to do it, then don't be another nub that doesn't realize what he's getting into.

You're not going to program Halo 4. You not going to read 'Learn C++ in 21 days' and even be able to create a game. Becoming a good programmer takes time and experience. The greatest way to learn is to DO. Don't be discouraged by how much there is to learn, take it step by step and DON'T STOP.

In other words, don't be another nub who says "ima leearn 2 prgm & make millionz on game! c im learning c++!!!!11" then quite two days later.

Seriously. Probably the worst problem most programmers face is motivation. Find a way to keep yourself motivated, yet realistic. And actually go through with your goals.
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Post by MarauderIIC »

The sig doesn't read as well the way you wrote it.

I think
yes it is
and yes it is
yes it is better
that is
is is is is is
we couldnt get very far in life and not say is
not is
not is!
Is better (that's straight from the chatlog :) )
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
Post Reply