C++
Post Reply
Quote
Re: C++
Posted by Le Chief on Thu Jul 5th at 4:06am 2007


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 <img src=" SRC="images/smiles/icon_biggrin.gif">







Quote
Re: C++
Posted by Crono on Thu Jul 5th at 7:09am 2007


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.



Quote
Re: C++
Posted by Le Chief on Thu Jul 5th at 11:09am 2007


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"







Quote
Re: C++
Posted by Crono on Thu Jul 5th at 7:07pm 2007


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).

? quote:
... 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.



Quote
Re: C++
Posted by Captain P on Fri Jul 6th at 12:17am 2007


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! <img src=" SRC="images/smiles/icon_smile.gif">


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 <img src=" SRC="images/smiles/icon_wink.gif">). Besides, it allows for much faster development, at the cost of performance, but that's ok for some prototyping. <img src=" SRC="images/smiles/icon_smile.gif">






Quote
Re: C++
Posted by Le Chief on Fri Jul 6th at 12:40am 2007


Cool, thanks Captain, I'll remember that book.





Quote
Re: C++
Posted by Cash Car Star on Fri Jul 6th at 12:48am 2007


QuArK's in Python. It's why they've been able to have so many user-created addons.




Quote
Re: C++
Posted by Le Chief on Fri Jul 6th at 1:21am 2007


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.







Quote
Re: C++
Posted by omegaslayer on Fri Jul 6th at 5:43am 2007


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).






Quote
Re: C++
Posted by Le Chief on Fri Jul 6th at 6:13am 2007


Yesss, thanks omegaslayer . 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 (). 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?







Quote
Re: C++
Posted by Yak_Fighter on Fri Jul 6th at 6:46am 2007


its red cause he's just that damn cool



Quote
Re: C++
Posted by Le Chief on Fri Jul 6th at 6:50am 2007


lol





Quote
Re: C++
Posted by Crono on Fri Jul 6th at 7:37am 2007


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.



Quote
Re: C++
Posted by Le Chief on Fri Jul 6th at 8:01am 2007


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.







Quote
Re: C++
Posted by Crono on Fri Jul 6th at 7:03pm 2007


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.



Quote
Re: C++
Posted by Le Chief on Sat Jul 7th at 2:44am 2007


Ok thankyou Crono. How long have you been doing c++ for?





Quote
Re: C++
Posted by omegaslayer on Sat Jul 7th at 5:09am 2007


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).






Quote
Re: C++
Posted by Crono on Sat Jul 7th at 7:11am 2007


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. image

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.



Quote
Re: C++
Posted by Le Chief on Sat Jul 7th at 9:14am 2007


Six years! WOW :O







Quote
Re: C++
Posted by Forceflow on Sat Jul 7th at 9:52am 2007


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




Post Reply