About this series:
Or rather, what I hope will be a series.
I've always wanted to learn an advanced programming language. I've loved the idea of being able to sculpt the computer to do what I want it to. My dad happens to be versed in many programming languages, and my mum is versed in visual basic. Me? Some DOS/batch file stuff, HTML and a smidge of VB.
This originally was going to be in a blog format, but since it would take forever to get started, the regular need for help, and space between posts, I took the decision to write up my experiences on the forums and go from there.
I will be editing the learning process. By that I mean I'll only include what is essential, so ill be removing many mistakes I make, various trips to Google to understand things and so on. When it comes to things I had to Google, I will write up what I gained, if anything.
I would love help from people who are versed in C++ and I hope to perhaps help others, also learning C++.
Getting Started:
After talking to my dad and looking on the net, I notice that 'Teach Yourself C++ in 24 hours' is a good book to get started with. My dad also happens to have a copy of the third edition amongst the multitude of code books on the shelves. Its available on line here [http://newdata.box.sk/bx/c/], and the physical copy comes with a compiler and all the code in the book.
As with anything new, I open it, ram the CD into my machine and fire it up. I install a compiler, fire it up and am raring to go.
First I need to...set up the compiler as they have in the book. No reason for this, but I storm ahead anyways.
Now I can start with the 'Hello World!' program.
I enter in the code as shown in my book annnnnddd:
[IMG_inline align="center" height="436" width="590" caption="Errors?" ]http://i156.photobucket.com/albums/t27/cyber_andyy/Teaching%20myself%20C%20series/Errorscreen.jpg[/IMG_inline]
Fuck.
I notice I put a v instead of a c for 'cout'. This is not encouraging. With the speed and dexterity of a walrus, I edit my foolish mistake. Annnnnddd:
[IMG_inline align="center" height="436" width="590" caption="Success!" ]http://i156.photobucket.com/albums/t27/cyber_andyy/Teaching%20myself%20C%20series/success.jpg[/IMG_inline]
Success! - Now to run it.
I double click, a flash of the command prompt appears on screen and then nothing. I'm left confused - Startled. What went wrong?
I take matters into my own hands, with my excellent deduction skills I change that 0 into a 1 and hey presto! Nothing happens. Well that was useful. By clicking the run button enough times, I can get the program to flash on and off like a strobe of failure. Still, I can read the program.
After realizing that my rhythm is much to be desired, I give up on the notion of attaching a screen shot.
I play around and revert some of the things we changed. More importantly, some of the 'set up' code for the compiler it got me to delete. (This is code is added automatically at the beginning of a new source file for you, by the compiler.)
After adding all that it works! I work backwards and deduce a typo in the book, or, something, left out a little .h in the . I change this to and we have a screen shot of my labours:
[IMG_inline align="center" height="436" width="590" caption="Im so good." ]http://i156.photobucket.com/albums/t27/cyber_andyy/Teaching%20myself%20C%20series/Fixed.jpg[/IMG_inline]
I push that any key to continue. And I push it well. For I have just corrected the textbook. I. Am. GOD!
Next week: Comments, Functions, Variables and Constants
Comments appreciated, as are explanations of what that .h does, and weather I should keep doing this
Or rather, what I hope will be a series.
I've always wanted to learn an advanced programming language. I've loved the idea of being able to sculpt the computer to do what I want it to. My dad happens to be versed in many programming languages, and my mum is versed in visual basic. Me? Some DOS/batch file stuff, HTML and a smidge of VB.
This originally was going to be in a blog format, but since it would take forever to get started, the regular need for help, and space between posts, I took the decision to write up my experiences on the forums and go from there.
I will be editing the learning process. By that I mean I'll only include what is essential, so ill be removing many mistakes I make, various trips to Google to understand things and so on. When it comes to things I had to Google, I will write up what I gained, if anything.
I would love help from people who are versed in C++ and I hope to perhaps help others, also learning C++.
Getting Started:
After talking to my dad and looking on the net, I notice that 'Teach Yourself C++ in 24 hours' is a good book to get started with. My dad also happens to have a copy of the third edition amongst the multitude of code books on the shelves. Its available on line here [http://newdata.box.sk/bx/c/], and the physical copy comes with a compiler and all the code in the book.
As with anything new, I open it, ram the CD into my machine and fire it up. I install a compiler, fire it up and am raring to go.
First I need to...set up the compiler as they have in the book. No reason for this, but I storm ahead anyways.
Now I can start with the 'Hello World!' program.
I enter in the code as shown in my book annnnnddd:
[IMG_inline align="center" height="436" width="590" caption="Errors?" ]http://i156.photobucket.com/albums/t27/cyber_andyy/Teaching%20myself%20C%20series/Errorscreen.jpg[/IMG_inline]
Fuck.
I notice I put a v instead of a c for 'cout'. This is not encouraging. With the speed and dexterity of a walrus, I edit my foolish mistake. Annnnnddd:
[IMG_inline align="center" height="436" width="590" caption="Success!" ]http://i156.photobucket.com/albums/t27/cyber_andyy/Teaching%20myself%20C%20series/success.jpg[/IMG_inline]
Success! - Now to run it.
I double click, a flash of the command prompt appears on screen and then nothing. I'm left confused - Startled. What went wrong?
I take matters into my own hands, with my excellent deduction skills I change that 0 into a 1 and hey presto! Nothing happens. Well that was useful. By clicking the run button enough times, I can get the program to flash on and off like a strobe of failure. Still, I can read the program.
After realizing that my rhythm is much to be desired, I give up on the notion of attaching a screen shot.
I play around and revert some of the things we changed. More importantly, some of the 'set up' code for the compiler it got me to delete. (This is code is added automatically at the beginning of a new source file for you, by the compiler.)
After adding all that it works! I work backwards and deduce a typo in the book, or, something, left out a little .h in the . I change this to and we have a screen shot of my labours:
[IMG_inline align="center" height="436" width="590" caption="Im so good." ]http://i156.photobucket.com/albums/t27/cyber_andyy/Teaching%20myself%20C%20series/Fixed.jpg[/IMG_inline]
I push that any key to continue. And I push it well. For I have just corrected the textbook. I. Am. GOD!
Next week: Comments, Functions, Variables and Constants
Comments appreciated, as are explanations of what that .h does, and weather I should keep doing this