Post subject: Good c++ newbie guides?
Player (70)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Many times I have searched, and many times I have failed. I feel there are no good guide that makes the programming fun to understand right away. They (allmost) always begin with the boring "Hello world!" bullshit. And after that it's just pure boredom of loops etc. Can any one give me a funnier guide or better guide?
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Highness wrote:
They (allmost) always begin with the boring "Hello world!" bullshit. And after that it's just pure boredom of loops etc.
There's a reason it's almost always like that. They begin by giving a general idea of what the language looks like. Then they begin teaching the fundamentals that are absolutely necessary for programming [in the language]. If you are a newbie at programming, you really need to learn the concepts of common concepts in programming, such as: - loops - conditional execution - functions - variables, constants and values - types That's because the languages are really made of that. If what you want is immediately lots of flashy stuff, you shouldn't try to learn C++. Instead, you should study some high-level macro language such as Shockwave ActionScript or perhaps DarkBasic. C++ is for programming, not copypasting some premade flashy bits together. Programming is of logic and structural thinking. The result of programming is a formal description of behavior. The description is built on those concepts such as variables etc. Edit 4: If you get bored with the description of loops and such and can't really understand it, perhaps you need an example that demonstrates something useful done with them. Edit 5: The best way to find such an example might actually be downloading the source code of some software that really interests you, and studying it. Just don't choose something too big. This is actually how I have learned. The first big'n difficult subject was Microsoft Nibbles (made with QuickBASIC).
Player (70)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Well.. I remember when we had java programming at school. We started right away with using the swing interface. That was funny. It was easy to create a windows gui without that much work. Also it was easy to make other graphic stuff. Funny for me in c++ would be for example to just pop-up a window and by a red dot or something paint the entire window red with a speed of one pixel per 0.2 seconds or something like that while using loops or something. :) Perhaps thats more clear of the "fun" part? Not like. When I type in value A and B it will out put value C. Thats not hard, nor is it fun. I want some guide that can give motivation to do all those boring stuff. I know it's not easy. I just want to go a diffrent way which shows off more than just a loop that counts from number 0 to 100 in a zip. Also.. I don't wanna get into Visual c++ or something like that. I feel it's too complex straight away. I wanna be able to type the code and still get a funny/exciting result.
Player (70)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Yeah! Makeing a small nibbles game would be of great fun! To learn how to use keyboard/mouse inputs etc. Paint beutiful 16 colors of joy! :D Implant music in my program.
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
Highness wrote:
Yeah! Makeing a small nibbles game would be of great fun! To learn how to use keyboard/mouse inputs etc. Paint beutiful 16 colors of joy! :D Implant music in my program.
Then you should use something else than C++. Perhaps VisualBasic or Python. If you can find something to make Flash applications, you could try that. Java might be a bit too complicated. C++ has no standard ways of, for example, drawing graphics because portability is one of its main issues. Whichever way you manage to get graphics on screen with C++ it will be non-standard and non-portable (and in most cases more difficult than it should be because, for whatever reason, perhaps complete incompetence of the authors of the libraries, most C++ graphics libraries out there are extremely hard to use).
Post subject: Re: Good c++ newbie guides?
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
Bisqwit wrote:
Edit 5: The best way to find such an example might actually be downloading the source code of some software that really interests you, and studying it. Just don't choose something too big. This is actually how I have learned. The first big'n difficult subject was Microsoft Nibbles (made with QuickBASIC).
Actually IMO that's one of the worst ways. Source code is not a beginner's tutorial and there will be no-one explaining you what all those things are doing and why, and you will be learning all kinds of bad habits due to misunderstandings and misconceptions. Worse yet, the code might be crappy because the programmer was inept, and if that is the case you will be learning doubly-bad habits. The other extreme might also be bad: If the programmer was an expert, he may be using fancy tricks which other experts understand right away but which confuse the beginner completely and who might start copying things he doesn't understand how or why they work. Beginners need a tutorial. Do you think an architect learns to design buildings by simply watching buildings? Watching buildings is important, of course, but learning should not be based on that (it should only be a secondary aid to the studying).
Player (70)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Ok.. This is getting deeper than I wanted it from the beginning. Any example tutorial is probably good. I understand that the more I read tutorials the more I learn and understand. I never said that I wanted cross-platform compability. A good thing to learn would be how to import libraries and use stuff in them. Geez. Just post alot of newbie links will ya? =D There is no mind that thinks in a 100% simmilar way. What may be logic for me may not be logic to you guys. Even though you might be more advance than I am at this stage. :)
Post subject: Re: Good c++ newbie guides?
Editor, Active player (296)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Warp wrote:
you will be learning all kinds of bad habits due to misunderstandings and misconceptions
Despite the fact that I'm as much a fan of ineffecient code as you are, I'd still be more likely to sacrifice academic enlightement for inspiration and motivation. Studying and modifying interesting programs is interesting. That was easy in QuickBasic, since little modifications could be done easily even before quite understanding the syntax completely. C++ compilers are pickier unfortunately :)
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
As I said, you should perhaps try some other language than C++. If you want to do something non-standard (such as graphics), there will be dozens of different ways to do that, most of which will completely depend on which compiler you are using. Specially in Windows there are myriads of different compilers, most of them commercial and in most of them getting graphics on screen is just plain complicated. Which C++ compiler do you even have, by the way? By the way, if you really, really, REALLY want to code something graphical with C++, try googling for "qt tutorial". I have never used qt myself, but from what I have heard it should be one of the easiest to use graphical libraries (which I suppose means that it's only very hard to use instead of extremely hard as all the others).
Player (70)
Joined: 8/24/2004
Posts: 2562
Location: Sweden
Downloaded the latest Bloodsheed DevCpp
Banned User, Former player
Joined: 3/10/2004
Posts: 7698
Location: Finland
By the way, you might also want to try http://www.wxwidgets.org/