C++

C++

Re: C++ Posted by Le Chief on Wed Jul 4th 2007 at 9:53am
Le Chief
2605 posts
Posted 2007-07-04 9:53am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
I bought this book today about c++ . I know for a fact that source and the gold source engines use c++ so I thought this might be useful. And I've always wanted to know how to do this sorta stuff so that I can add real cool stuff into a certain half-life 1 mod. Its real hard but I'm getting there, I created the famous program 'hello world' than I stopped and had a rest, and now I'm on snarkpit.

I was just wondering if anybody does or has attempted c++ coding?
Aaron's Stuff
Re: C++ Posted by reaper47 on Wed Jul 4th 2007 at 10:16am
reaper47
2827 posts
Posted 2007-07-04 10:16am
reaper47
member
2827 posts 1921 snarkmarks Registered: Feb 16th 2005 Location: Austria
I did. I once programmed an AI for Revesi, my favourite board game. I'm still proud of that. :rolleyes: But then it got too long-winded and I didn't do anymore else.
Why snark works.
Re: C++ Posted by Crono on Wed Jul 4th 2007 at 10:42am
Crono
6628 posts
Posted 2007-07-04 10:42am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Attempted and conquered. I'm almost done with my Computer Science degree as well. I've been using Java more than anything else lately though.

If you don't know ANY programming language ... C++ is NOT what you want to start with. Especially if all you have is a book (which is most likely not even written well, since 98% or so of C++ books, specifically, are actually incorrect in many aspects of the language).

I would suggest starting with something more simple that has similar or identical syntax ... like PHP. Using something like Java would allow you to learn how to use objects and things like that without worrying about memory management. (The most common errors stem from poor memory management).

Also be aware that when regarding C++, there's a different between "C++" and "Visual C++", the latter being Microsoft's significantly altered version of the language, which I do not suggest using to start out with. It will do nothing but make you an even worse programmer.

As far as programming goes, in general, you really should learn the semantics of programming before jumping into (like, how languages generally work and what data structures are and how they're important. Otherwise there's no way in hell you'll be able to pick up someone else's code and read it), arguably, the most difficult language around.

And if you think you're just going to learn this and jump over to work on some half-life mod code ... well ... good luck, you'll need it.
Blame it on Microsoft, God does.
Re: C++ Posted by Cash Car Star on Wed Jul 4th 2007 at 11:08am
Cash Car Star
1260 posts
Posted 2007-07-04 11:08am
1260 posts 345 snarkmarks Registered: Apr 7th 2002 Occupation: post-student Location: Connecticut (sigh)
I make a terrible C++ coder. I took Comp Sci in college and I'd
understand the algorithms, but I just can't sit down and code. I
lose sense of what I'm doing, forget all my commands and make stupid
mistakes that constitute big errors. Also, I find it
boring.

That said, I find I'm pretty decent with highly constrictive
object-oriented coding. Hypercard, Visual Basic, Standard HL
Entities... I once made Tic-Tac-Toe as a CS map. You'd play
the game by shooting at a grid and then it would kill the loser.
Granted, it was STUPID and a completely backass way to play Tic-Tac-Toe
(aka Naughts and Crosses you silly limeys) so after a small prime
number of games between myself and my roommate I nuked it. It was excellent entity practice though.

Basically, I like trying to break constraints. C++ doesn't really
have that many. Halflife has a ton, but they're breakable.
Re: C++ Posted by Le Chief on Wed Jul 4th 2007 at 12:29pm
Le Chief
2605 posts
Posted 2007-07-04 12:29pm
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Ok cool, thanks guys for the replies. The book I've got is called 'Teach yourself c++ in 24 hours' basically its a book of 24, one hour lessons and by the end, you know basic c++ . It also comes with a cd that contains a neat little compiler.

I think I'll find that I do much better on the art side of games than on the Engineering side. However hopefully this will help me out in the long run. If other human beings can do it, than there's no reason why I can't. 3D Studio max is another program they I have and have gotta learn.

Although Crono, it is extremely daunting with all the terminology that both you and the book uses, like : Classes, Loops, switches and library's, its very scary stuff. Maybe I should start of with Java First. Also, thanks for clearing up the visual c++ thing, I was wondering what that was all about.

I wish there was like this pill that I could take to instantly have all information about all aspects of game design implanted in my head.

By the way, the book is 503 pages long.
Aaron's Stuff
Re: C++ Posted by ReNo on Wed Jul 4th 2007 at 1:35pm
ReNo
5457 posts
Posted 2007-07-04 1:35pm
ReNo
member
5457 posts 1991 snarkmarks Registered: Aug 22nd 2001 Occupation: Level Designer Location: Scotland
I'm a competent programmer, but nothing special. C/C++ are my primary languages, although I can also use Java. I'm inclined to agree with Crono that you'd probably be better off learning with something like Java (or PHP, although I've no experience with that so I'll take his word for it) as it does handle a lot of the more complex parts of programming for you, but I learnt Java after learning C/C++, so it certainly can work out doing it that way around. Then again, I did learn in uni, so it's not exactly comparable to teaching yourself from a book!

Best of luck Aaron, it's gonna take a lot of determination and practice to get good at programming so stick with it.
[img]http://card.mygamercard.net/sig/Default/reno84.png[/img]
Designer @ Haiku Interactive | ReNo-vation.net
Re: C++ Posted by BlisTer on Wed Jul 4th 2007 at 1:59pm
BlisTer
801 posts
Posted 2007-07-04 1:59pm
BlisTer
member
801 posts 1304 snarkmarks Registered: Jun 10th 2004 Location: Belgium
I followed 2 classes of Java in uni. I understood it quite well back then, with the hardest program i wrote something that used backtracking.

I forgot most of it, untill i started fiddling with LUA scripting for HL2 last month. It proves the object-oriented approach really sticks :wink:
Re: C++ Posted by G.Ballblue on Wed Jul 4th 2007 at 6:25pm
G.Ballblue
1511 posts
Posted 2007-07-04 6:25pm
1511 posts 211 snarkmarks Registered: May 16th 2004 Occupation: Student Location: A secret Nuclear Bunker on Mars
The best bit of help I can suggest would be to, like what Crono said, start with something a bit easier. Visual Basic .Net is what I learned/am learning first. It's not any where near the realm of C++, in terms of complexity and power, and it shows you that even writing a smiple data base program can be a real mind f**k at times.
Breaking the laws of mapping since 2003 and doing a damn fine job at it
Re: C++ Posted by Crono on Wed Jul 4th 2007 at 8:21pm
Crono
6628 posts
Posted 2007-07-04 8:21pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
I'm a competent programmer, but nothing special. C/C++ are my primary languages, although I can also use Java. I'm inclined to agree with Crono that you'd probably be better off learning with something like Java (or PHP, although I've no experience with that so I'll take his word for it) as it does handle a lot of the more complex parts of programming for you, but I learnt Java after learning C/C++, so it certainly can work out doing it that way around. Then again, I did learn in uni, so it's not exactly comparable to teaching yourself from a book!

Best of luck Aaron, it's gonna take a lot of determination and practice to get good at programming so stick with it.
Exactly. I learned at a university as well, and C++ was my first language, but I had like one of the best C++ Computer Science instructors in the entire NW USA.

PHP is pretty neat in that it has the exact same language syntax as C/C++/Java, and there's really no ... hard stuff ... that's the best way I can explain it. The only real advantage you'd have by learning something like Java is documentation. There's so much it's crazy, it's actually more difficult to wade through the documentation on the language then to actually learn the language. However, there are books available online that are free (Like Eckles' book Thinking in Java, however, I don't know how good, or bad, his C++ books are).

If you're serious about learning this stuff, that's cool, but, it's hard and there's a lot more to "programming" than just knowing how a language works. CCS mentioned it. Algorithms. Especially when it comes to run time intensive things like games.

I guess the only good news I have is that, you're still in high school and young so you have plenty of time. Just try to avoid learning all of this stuff the wrong way (which is very easy to do with something like C++).

Anyway, PHP has loops, classes (I know I was surprised too), arrays, functions, all that junk. You can even get some plugins for IDE suites, like Eclipse, to use PHP and actually run it without a server. It might even work without the need for HTML.

Go look around for it. (php.net beginner tutorials maybe?)
Blame it on Microsoft, God does.
Re: C++ Posted by Gorbachev on Wed Jul 4th 2007 at 8:27pm
Gorbachev
1569 posts
Posted 2007-07-04 8:27pm
1569 posts 264 snarkmarks Registered: Dec 1st 2002 Location: Vancouver, BC, Canada
I make a terrible C++ coder. I took Comp Sci in college and I'd
understand the algorithms, but I just can't sit down and code. I
lose sense of what I'm doing, forget all my commands and make stupid
mistakes that constitute big errors. Also, I find it
boring.
I'm the same way, I suck at sitting down and coding, but I can read/understand and solve bugs in coding that's already done quite well.
Re: C++ Posted by Stadric on Wed Jul 4th 2007 at 10:40pm
Stadric
848 posts
Posted 2007-07-04 10:40pm
Stadric
member
848 posts 585 snarkmarks Registered: Jun 3rd 2005 Occupation: Slacker Location: Here
You may enjoy reading this as extra credit.
Edited for Crono

I can code a little Java, but it's been a while, and I didn't do anything overly complex. I did make a text-based game, though, but I thought it was too easy (the programming, not the game itself, that was actually kind of hard).
Also change the texture of the dock. Docks are rarely tile. -Facepunch
As I Lay Dying
Re: C++ Posted by Crono on Wed Jul 4th 2007 at 11:05pm
Crono
6628 posts
Posted 2007-07-04 11:05pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Introductory purposes? Boolean Algebra and Logic?

The entire point of learning a high level language as a beginner is so you don't need to focus on those things. (However, knowing the terminology of how memory works is recommended)

But actually knowing how gates work and arithmetic in various number bases is really not needed. Knowing those things wont actually make you a better programmer, though you may become more aware of memory use, but that can be leaned without knowing the ins and outs of how the hardware works. Okay, so, if you're making an AI agent for some game it would be nice if you know how to get your entire state space to be stored in cache since you're going to be working with an enormous branching factor and want to stay away from memory ... but that's hardly introductory.

Leaning these things from the start would probably make things much more difficult, since you wouldn't have any frame of reference. Generally, when you learn about how the hardware works you can relate it to what you know about your programming language. If it's C or C++ then that makes a pretty nice connection, since you're actually dealing with memory there.

To be honest, programming in Java is even easier if you have reference to a programmer memory control language like C++. It allows you to understand how to use Java more efficiently.

Anyway, I wouldn't, personally, suggest jumping into any hardware architecture stuff until you at least know one language and general programming ideas (for starters it's much easier to learn boolean operators at that level)
Blame it on Microsoft, God does.
Re: C++ Posted by Cash Car Star on Thu Jul 5th 2007 at 12:43am
Cash Car Star
1260 posts
Posted 2007-07-05 12:43am
1260 posts 345 snarkmarks Registered: Apr 7th 2002 Occupation: post-student Location: Connecticut (sigh)
I miss the days when everyone's first language was BASIC.
Re: C++ Posted by Yak_Fighter on Thu Jul 5th 2007 at 1:26am
Yak_Fighter
1832 posts
Posted 2007-07-05 1:26am
1832 posts 742 snarkmarks Registered: Dec 30th 2001 Occupation: College Student/Slacker Location: Indianapolis, IN
I took two years of computer science and all I remember is

cout >> "Hello World";

I did make a kickass poker game in collaboration with a much better coder though, he did all the mechanics and I made the debugger and the AI, which had five different skill levels and would randomly select which to use in order to give the game some variety :cool:
Re: C++ Posted by Le Chief on Thu Jul 5th 2007 at 1:30am
Le Chief
2605 posts
Posted 2007-07-05 1:30am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
<DIV class=quote>
<DIV class=quotetitle>? quoting reno</DIV>
<DIV class=quotetext>Best of luck Aaron, it's gonna take a lot of determination and practice to get good at programming so stick with it.</DIV></DIV>

Awww thanks man :biggrin: .

Thanks for all the advice people. And I must say, I am suprised how many people know somthing about coding. You guys really blew past my expectations.
Aaron's Stuff
Re: C++ Posted by wil5on on Thu Jul 5th 2007 at 1:46am
wil5on
1733 posts
Posted 2007-07-05 1:46am
wil5on
member
1733 posts 570 snarkmarks Registered: Dec 12th 2003 Occupation: Mapper Location: Adelaide
2.5 years of learning (and teaching) java. Tried to learn C++ for a bit, I didnt have much trouble picking the language up (I did a course in ASM before it) but other projects took over. I'm taking a proper course in it (C/C++) soon so I'll get me a proper edjimacation in it.

I tried some HL mod coding long ago (probably my first introduction to C++) and did some cool stuff, but didnt know enough at the time to do anything really interesting.
"If you talk at all during this lesson, you have detention. Do you understand?"
  • My yr11 Economics teacher
Re: C++ Posted by Le Chief on Thu Jul 5th 2007 at 1:47am
Le Chief
2605 posts
Posted 2007-07-05 1:47am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Good luck man
Aaron's Stuff
Re: C++ Posted by G.Ballblue on Thu Jul 5th 2007 at 2:33am
G.Ballblue
1511 posts
Posted 2007-07-05 2:33am
1511 posts 211 snarkmarks Registered: May 16th 2004 Occupation: Student Location: A secret Nuclear Bunker on Mars
The most impressive thing I've done with VB.Net was a space invaders game. My instructor actually got the best sample of the source code I had, since I turned it into him with a few improvements that I had made that morning.

I've actually got the thing on my hard drive; at some point, I should see what I could do with it. I always wanted to try and add some movement into the game, like the classicial space invaders games, such as Gorf.
Breaking the laws of mapping since 2003 and doing a damn fine job at it
Re: C++ Posted by Le Chief on Thu Jul 5th 2007 at 3:16am
Le Chief
2605 posts
Posted 2007-07-05 3:16am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Man the possibilyties are endless when you know how to code, I swear.
Aaron's Stuff
Re: C++ Posted by mazemaster on Thu Jul 5th 2007 at 3:40am
mazemaster
890 posts
Posted 2007-07-05 3:40am
890 posts 438 snarkmarks Registered: Feb 12th 2002
If you just want to be able to hack some things together, then just learning a single language like java or c++ or whatever will be fine. However, if you want to gain greater understanding and become a "good programmer", it is useful to learn several different types of languages. Even if you never use the crazy ones again, just knowing them will make you a better programmer in your language of choice.

Preferrably learn 1 from each of these 5 categories:
1) Object-oriented (C++, java, etc)
2) Functional (scheme, lisp, etc)
3) Declarative (prolog, etc)
4) Assembly (any will do)
5) Array/math based (Matlab, GNU Octave, etc)
Re: C++ Posted by Le Chief on Thu Jul 5th 2007 at 4:06am
Le Chief
2605 posts
Posted 2007-07-05 4:06am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Wow, ok thanks for that mazemaster. I'm gonna save this webpage so I have all this information stored on ma laptop.

I have just finished the second hour of the book. Just 22 hours left, in the second hour, I examined the Hello World program and what the commands do. I also learnt about c++ comments (// Hello, this is a c++ comment) and c style comments (* Hello this is a c styled comment *)

I also learnt about encapsulation, inheritance and polymorphism :biggrin:
Aaron's Stuff
Re: C++ Posted by Crono on Thu Jul 5th 2007 at 7:09am
Crono
6628 posts
Posted 2007-07-05 7:09am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
The book is talking about inheritance at the same time as comments? ... I do not recommend this book. Next it probably suggests to use templates whenever possible and discusses operator overloading in great depth before discussing pointers, classes, or structures.
Blame it on Microsoft, God does.
Re: C++ Posted by Le Chief on Thu Jul 5th 2007 at 11:09am
Le Chief
2605 posts
Posted 2007-07-05 11:09am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
It was just explaining some history and what makes a good programmer.

It was explaining what inheritance is and stateing that c++ supports the idea of inheritance and also said "Inheritance and its application in c++ are discussed in Hour 16"
Aaron's Stuff
Re: C++ Posted by Crono on Thu Jul 5th 2007 at 7:07pm
Crono
6628 posts
Posted 2007-07-05 7:07pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
It seemed that you were implying the book instructed you in the ways of advanced C++ programming (or at least the basis for all advanced C++ programming).
... n the second hour, I examined the Hello World program and what the commands do. I also learnt about c++ comments (// Hello, this is a c++ comment) and c style comments (* Hello this is a c styled comment *)
I also learnt about encapsulation, inheritance and polymorphism
I want to note that, if the book, at any point, says anything along the lines of, "Templates are a powerful tool that should be utilized as often as possible", the book should be ignored.

If it also discusses multiple inheritance and described why you should use it ... again, ignore it.

These are two things that a lot of people use and it makes their code very sloppy and often times makes it overtly complicated.

There's some other stuff too, but those are big ones. You'll see when you get to hour 16 or whatever.
Blame it on Microsoft, God does.
Re: C++ Posted by Captain P on Fri Jul 6th 2007 at 12:17am
Captain P
1370 posts
Posted 2007-07-06 12:17am
1370 posts 1995 snarkmarks Registered: Nov 6th 2003 Occupation: Game-programmer Location: Netherlands
Once you think you're comfortable with C++, get 'Effective C++' by Scott Meyers. It'll open your eyes to a whole set of small, irky details that you probably never heard about before. C++ is often taught in a wrong way, and it's easy to go straight past a whole lot of stuff without ever noticing you learned things the wrong way. I certainly wasn't aware of quite some of the things he discussed even after 3 years of programming...

So, be warned: C++ is pretty complicated, and it assumes you know what you're doing. Good luck! :smile:

Right now I'm using Python to prototype some game idea's. It's a pretty nice language, easy to pick up, and doesn't suffer from such nasty details (as far as I've seen, that is :wink: ). Besides, it allows for much faster development, at the cost of performance, but that's ok for some prototyping. :smile:
Create-ivity - a game development blog
Re: C++ Posted by Le Chief on Fri Jul 6th 2007 at 12:40am
Le Chief
2605 posts
Posted 2007-07-06 12:40am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Cool, thanks Captain, I'll remember that book.
Aaron's Stuff
Re: C++ Posted by Cash Car Star on Fri Jul 6th 2007 at 12:48am
Cash Car Star
1260 posts
Posted 2007-07-06 12:48am
1260 posts 345 snarkmarks Registered: Apr 7th 2002 Occupation: post-student Location: Connecticut (sigh)
QuArK's in Python. It's why they've been able to have so many user-created addons.
Re: C++ Posted by Le Chief on Fri Jul 6th 2007 at 1:21am
Le Chief
2605 posts
Posted 2007-07-06 1:21am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Sorry I missed your post CRONO, I'll look out for those lines to ingonre you mentioned (did that make sense?). So far the book hasen't reccomended templates.

And why on earth to people use Quark. I have tries to use it, and failed. Its so hard to navigate your map and make complex objects. And I'll research more about this "Python" language.
Aaron's Stuff
Re: C++ Posted by omegaslayer on Fri Jul 6th 2007 at 5:43am
omegaslayer
2481 posts
Posted 2007-07-06 5:43am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Well you don't want to dismiss templates....period..... I think the point crono was trying to make is that you should understand the underlaying code that IS templates (Or are we not speaking of STL - standard template library), then you can effectively use them.

Just wait till you get to pointers arron, you'll be tearing your hair out over the segmentation fault errors, but a good coder always knows where his pointers go awry. C++ coding is half knowledge, and half art (effective code anyways).
Posting And You
Re: C++ Posted by Le Chief on Fri Jul 6th 2007 at 6:13am
Le Chief
2605 posts
Posted 2007-07-06 6:13am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Yesss, thanks omegaslayer :cool: . I read the third hour in the morning and they where talking about "variables and Constants" and just the tittle made me s**t my self. But it wasn't that bad, i'll probley have to re-read it though later.

Anyway, how is it possible for programmers do remember all this stuff. The language itself, the terms, all the technical stuff. When I first bought the book, I was flicking through it while my laptop was loading, I'd only been home for like three minutes, my brother walks in and says "So have you started making your game yet?" He has no idea at all.

edit: You know what I don't get, this smiley ( :cool: ). Why does he have a brown face. Is there something I'm not getting? Shouldn't he have a yellow face like his friend's?
Aaron's Stuff
Re: C++ Posted by Yak_Fighter on Fri Jul 6th 2007 at 6:46am
Yak_Fighter
1832 posts
Posted 2007-07-06 6:46am
1832 posts 742 snarkmarks Registered: Dec 30th 2001 Occupation: College Student/Slacker Location: Indianapolis, IN
its red cause he's just that damn cool
Re: C++ Posted by Le Chief on Fri Jul 6th 2007 at 6:50am
Le Chief
2605 posts
Posted 2007-07-06 6:50am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Re: C++ Posted by Crono on Fri Jul 6th 2007 at 7:37am
Crono
6628 posts
Posted 2007-07-06 7:37am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
If you want a pretty end all be all well explained wonderfully written (and correct) book on the actual C++ language, when you're ready, seek out C++ Primer Plus by Prata. I think it's in like the sixth or seventh edition. As far as I can tell the newer editions only add some explanation of newer standards and cost a great deal more. I think the current edition runs for almost $60 and I bought mine (3d edition) for $35. If you live anywhere near a college campus take a trip to their book store and you'll find more books (at an okay used price, if they have some used copies) than you can shake a stick at.

The great thing about the book is it goes about as deep as Stroustrup's books (primary designer/creator of the C++ language) but is far simple to understand. From what I've heard, his book is incredibly complicated and difficult to understand ... for people who've been using the language professionally for over a decade. Yikes.

Aaron, I would suggest ignoring the rest of this post. It might scare you away from programming.

Omegaslayer:
In general, I would recommend against using templates. Why you ask? Because you can't possibly guarantee what a template guarantees. It says "Any data type that can be created from now to the end of time can be used with this template" ... and there's no way IN HELL you can guarantee that because it encompasses user defined data types.

Now, of course, if you're very experienced and you just don't want to write yet another binary tree ... then by all means use the template in the STL, but in general ... they're really just not implemented properly. The reason why is because C++ is not inherently an object oriented programming language. It's C with a bunch of stuff on top. Now a language like Java is designed for that type of thing, which is why it's pre-made structures DO work for most all objects and the portions that you need to define for your class are, most generally, abstract and need to be overloaded locally.

In addition, most people just plain use templates when you don't need them. Templates are really something you should learn after you know the ins and outs of the language and can build these structures on your own (not to mention building a complete binary search tree with hash table nodes will teach you much of what you need to know about pointers)
Blame it on Microsoft, God does.
Re: C++ Posted by Le Chief on Fri Jul 6th 2007 at 8:01am
Le Chief
2605 posts
Posted 2007-07-06 8:01am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Why thankyou Crono. When I finish this book I was planning to buy another book, slightly more advanced. I'll remember that.

I went against your advice and read the rest of your post. I'm getting meself a night mare tonight, yep.
Aaron's Stuff
Re: C++ Posted by Crono on Fri Jul 6th 2007 at 7:03pm
Crono
6628 posts
Posted 2007-07-06 7:03pm
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Something else I forgot to mention.

You'll want to pick up a Data Structures book at some point (or else you wont know what to do with your newly created data).

The book I have is okay. It's better than most, but you could probably do better. What you want to stay away from are books that say use templates for everything (which is much more predominant in data structure books) and I already explained why that's a bad idea.
Blame it on Microsoft, God does.
Re: C++ Posted by Le Chief on Sat Jul 7th 2007 at 2:44am
Le Chief
2605 posts
Posted 2007-07-07 2:44am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Ok thankyou Crono. How long have you been doing c++ for?
Aaron's Stuff
Re: C++ Posted by omegaslayer on Sat Jul 7th 2007 at 5:09am
omegaslayer
2481 posts
Posted 2007-07-07 5:09am
2481 posts 595 snarkmarks Registered: Jan 16th 2004 Occupation: Sr. DevOPS Engineer Location: Seattle, WA
Crono-
Yup I agree with you on that. I've dealt with STL, and while I can see its usefulness, i've always coded my own binary tree (which BTW you don't ALWAYS want to use for everything) or hash table or quicksort (no debates as to which sort is better please).
Posting And You
Re: C++ Posted by Crono on Sat Jul 7th 2007 at 7:11am
Crono
6628 posts
Posted 2007-07-07 7:11am
Crono
super admin
6628 posts 700 snarkmarks Registered: Dec 19th 2003 Location: Oregon, USA
Well, if you can get the data sorted in a binary structure that's best since you got that gorgeous O(lg n) time complexity. Merge sort is better all-around though, for most situations. :smile:

I learned C++ when I stated by degree, and I've been doing that for awhile. I took is slow for a couple years and only recently (last two or three years) really started taking heavier course loads. But, six years.

But, I'll tell you that the actual act of learning C++ was the easiest and least important part of my degree and programming in general. Design is where it's at, if you can't do that, you can't do s**t (I've ran into many people like this and it always astonishes me that you'd get this degree specifically to get a job as a code when your skill set allows you to do things far more interesting and rewarding). You're basically an assembly line worker who can code other people's designs, which is boring and often times very frustrating. After all the entire point of learning programming methodology and languages is to solve problems. If someone learns "to code" just so they can, it's a horrible and completely useless reason, and their skills will be in the same shape, most likely.
Blame it on Microsoft, God does.
Re: C++ Posted by Le Chief on Sat Jul 7th 2007 at 9:14am
Le Chief
2605 posts
Posted 2007-07-07 9:14am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Six years! WOW :O
Aaron's Stuff
Re: C++ Posted by Forceflow on Sat Jul 7th 2007 at 9:52am
Forceflow
2420 posts
Posted 2007-07-07 9:52am
2420 posts 451 snarkmarks Registered: Nov 6th 2003 Occupation: Engineering Student (CS) Location: Belgium
I'm a fairly competent Java programmer myself (hardest stuff I've done is probably a multiplayer on-line board game with stats, or some nasty GUI work).

I can recommend www.mindview.net for good C++ books by Bruce Eckel.
:: Forceflow.be :: Nuclear Dawn developer
Re: C++ Posted by Le Chief on Sun Jul 8th 2007 at 2:40am
Le Chief
2605 posts
Posted 2007-07-08 2:40am
Le Chief
member
2605 posts 937 snarkmarks Registered: Jul 28th 2006 Location: Sydney, Australia
Wow, nice work forceflow.
Aaron's Stuff