Learning to program in C++
How many people here know how to program in c++.
How hard was it and how long did it take
I'm 14 and have been trying to learn c++ since i was 10
it failed most of the time but i feel that i can grasp most of the basic concepts now of c and c++
(i can't believe that i didn't understand why i should use loops )
Anyway how should i progress towards my goal of being able to program in C++
any books or anything.
how should i go about becoming a better programmer
I learned C++ when I was an undergrad. I only took and passed two classes, though.
I would buy a textbook and study it religiously. I recommend the one written by Savitch (or something like that). He writes several textbooks so make sure you buy the one for beginners. He's from UC San Diego.
I heard C++ is more powerful than Java or Basic but that both Java and Basic are easier to pick up. In fact, I think that was the original purpose for the creation of Basic.
_________________
If there's such a thing as god, he's a sick bastard.
C is my favourite programming language.
Open Watcom can be downloaded fro free. http://www.openwatcom.org/
I would say some programming knowledge is more than a bit useful (I already used BASIC and had experience of assembler (TI9900) before I learnt C and C++)
there are lots of good books on C++
Good programming practice is essential, writing clear and meaningful comments throughout your code so when you come back to it you (or anyone else) can figure out what your doing.
I was taught whilst studying AI at university.
Book I have "Program Development and Design Using C++" Gary J Bronson
Was for whole year double module.
_________________
Wisdom must be gathered, it cannot be given.
Last edited by iceb on 12 Dec 2007, 1:23 am, edited 1 time in total.
Learn C first. It's a much smaller and more elegant language.
If you really want the object-oriented sugar that C++ offers, you can easily pick it up once you're comfortable with C. (Don't be fooled into thinking C++ is "more powerful" than C, though. It's entirely possible to express an object-oriented design in pure C, and IMNSHO learning how to do that should be a prerequisite to learning C++'s OO features. I've seen lots of really awful code written by people who used C++'s OO features without actually understanding what they were doing.)
Actually, if you like playing with really low-level stuff, think about learning a little bit of assembly before (or in parallel to) diving into C or C++. Once you're used to dealing with memory addresses in CPU registers, concepts like pointers will be second nature.
It's awesome that you want learn programming at your age!
I'm quite experienced with C++, but I don't know what books to recommend to you for beginners learning. You may want to see if Cay Horstmann, Professor at San Jose State, did any C++ books. His Java book was great for beginners. He had good explainations, writing style, examples, and overall flow of information. What I'm afraid of in your case is that many C++ books tend to jump into advanced topics quickly. Not to say you won't someday read them with ease, but you don't want to get to bogged down early on.
A good beginners book should have program problems at the end of the chapter. You should do a few to make sure you really understand what's going on. If you've done basic variables types and loops, I assume you can print output to the screen and have written some code and got it to display the results you wanted?
I would guess that after variables and loops, you may want to move on to either:
1. arrays
2. functions: calling, passing parameters by value and reference, and returning values. This will also introduce you to variable scope.
I would recommend that you cover the basics in an intro to C++ book, code some of the programming problems at the end of the chapters, and then write you own program. Think of something you would like to write for yourself. Something that would require effort.
If you want to be a better programmer, write code! After you go through a beginners book, write a good sized program for yourself. Then move up to a higher level C++ book. If you can grasp advanced topics, then you can pretty much do whatever you want. In my opinion, writing code to display windows and things like basic graphics is easy, so I wouldn't spend alot of time of it. Once you get past the beginners material, there is no limit to what you can do.
Write code. Read more. Think about how you can apply new ideas to old code to make it better. Post what topics you know, and that will give people a better idea where you are at.
Personally, I would hold off assembly language until you have a good grasp of C++, since you started with C++ stick with it. I think it's more fun to start with a high-level language, then go down to assembly and such. You have plenty of time for that later. First prove you can do it at a higher level.
Jon
Jon
That's an interesting point. But at the same time, I've known assembly and C programmers who just can't seem to fully grasp true OO. They always want to revert back to the straightforward design techniques that they know best. But, you may be right, maybe it is better to start with assembly. I don't think so, but I could certainly be wrong!
It probably has more to do with the student than the language they first used. I started with C++, but really enjoyed my assembly classes. It taught me to think how my C++ code was actually being implemented at the low-level. My opinion is that if I learned in reverse order, it would have made absolutely no difference in my programming ablility, as long as I learned both. Either without the other is no good. Then it comes down to which is more fun. For a teenager, in general, I would encourage a high-level language to maintain their interest. Then, if they are still interested and want the nuts and bolts they can have them.
kicken18
Yellow-bellied Woodpecker
Joined: 27 Dec 2007
Age: 38
Gender: Male
Posts: 50
Location: Kent, England
Jon
That's an interesting point. But at the same time, I've known assembly and C programmers who just can't seem to fully grasp true OO. They always want to revert back to the straightforward design techniques that they know best. But, you may be right, maybe it is better to start with assembly. I don't think so, but I could certainly be wrong!
It probably has more to do with the student than the language they first used. I started with C++, but really enjoyed my assembly classes. It taught me to think how my C++ code was actually being implemented at the low-level. My opinion is that if I learned in reverse order, it would have made absolutely no difference in my programming ablility, as long as I learned both. Either without the other is no good. Then it comes down to which is more fun. For a teenager, in general, I would encourage a high-level language to maintain their interest. Then, if they are still interested and want the nuts and bolts they can have them.
Sorry, I've been kind of busy and just got back to write more. Forgot about this, but remembered again.
The fact that you've known assembly and c programmers who don't "fully grasp true OO" doesn't convince me that my experiences teaching undergrad classes in computer science to large classrooms of students is anything other than what it was. Those students with almost any level of assembly experience were almost to a person far better in more rapidly pursuing the established curriculums required to achieve a degree. And where most of my experience is at, in developing various nationally sold applications and commercial and scientific instrumentation, those I worked with with the least trouble and to the greater effect in getting the job done was with those having such experiences in their backgrounds.
However, I also don't mean to discount your own life and experience in this area. If you really feel that it hinders, instead of helps, based upon your own background and experience here then you are certainly entitled to your perspective on it. I just can't set aside all my own experience in this area. Perhaps we are like the blind men and the elephant, seeing different parts of the same thing.
Jon
If it helps any, I'd suggest writing programs in ANY form of structured programming language. My brother started programming professionally in RPG-IV and just switched to programming in Java just recently. As for Assembly specifically, I would stay away from that language unless if you REALLY know what you're doing (although helpful to help with the learning, it's a language that requires a more indepth knowledge of computer hardware than most other languages).
As for particular books, try "Thinking in C++, Volume 1 and 2". I'm not sure, but I think it's downloadable from www.MindView.net.
Similar Topics | |
---|---|
Got invited to a man from Day Program's house...should I go? |
07 Sep 2024, 9:40 am |
Anybody here used Anki or similar program? |
16 Sep 2024, 8:22 am |
Learning acceptance to cope with losses |
18 Sep 2024, 8:19 am |
Learning Disabilities and Autism Spectrum Disorder |
31 Dec 1969, 7:00 pm |