C++, Can you help me solve this problem? http://screencast.com/t/ODb5sVGzq
Break it down into smaller parts, and break them down into smaller parts and keep breaking it down until you're basically forced to write code.
what do u mean ?
Large problems, taken as a whole, are daunting and confusing. The first step in writing a program is almost always decomposing the problem ( breaking it down into smaller problems that together solve the larger problem ). Then you decompose the smaller problems. You keep repeating this until the problems take just a few lines of code to solve. Each of the sub-problems correspond roughly to a function. One course that I did said that functions should generally be 15 or less lines of code. I've started to like, as I'm decomposing, writing the function's comments, and definition and then coming back later and actually coding and debugging it.
Join our real-time social learning platform and learn together with your friends!