How do you get the concept of coding by using Codeblocks?

I have been using codeblocks for 3 months now & I still don't understand the concept of writing source code. I have acquired the codeblocks learning disc through my purchase of the Beginning Programming with C++ for Dummies book. I have done several code projects (off the disc) by copying the code straight from the book, but how will this help me to learn how to write source code off the top of my head? Do I need to refresh on geometry or algebra 2 in order to develop or write my own code for personal projects? Can someone tell me how to write your own code, as opposed to copying someone else's code correctly (out of the book)... I would like to learn how to write code from scratch... I need some advice!
Last edited on
This could be helpful...
http://www.cplusplus.com/doc/tutorial/
Last edited on
That's like asking "Hey, I've learned every scale and chord in my piano book and can play other peoples music but how do I write my own songs???" The answer is to develop your own creativity. Programming is not about language syntax, code structures or knowing the ins and outs of every external library. It's about knowing how to put the pieces together to create an algorithm that solves a problem or performs a task. You need to learn critical thinking and the best way to do that is to pick a problem you're very familiar with and break it down into its constituent parts. Once you have a complex problem reduced to a sequence of simple tasks you can code them as functions and then connect the functions in a logical way to create a procedural program. (Another option is the Object Oriented Paradigm but work with simpler procedural code first.) I would recommend you give this PDF a read: http://greenteapress.com/thinkcpp/

As soon as you feel comfortable with the concepts START APPLYING THEM RIGHT AWAY!!! Write code that guides you step-by-step through the process of making a toasted PB and banana sandwich if you have to. (Once you're done you can try it out and have a nice snack as a reward.)
Topic archived. No new replies allowed.