How do I become better at C++?

Discussion in 'Software' started by BigBangTheory, Feb 3, 2009.

  1. BigBangTheory

    BigBangTheory Private E-2

    I took a basic computer course at my college a while ago, and we did machine-level programming (which I found quite easy) as well as C++. I had trouble with C++ though. How do you become better at devising the source code for things that you want to do? Many times, he would tell us to write a program that does a particular thing, and I would have no clue how to go about it.
     
  2. PC-XT

    PC-XT Master Sergeant

    I also started with machine-level coding, as well as BASIC and DOS batch files. C++ is similar to assembler, but it is expressed in a different way, and uses classes to organize code, rather than procedure blocks. It took longer for me to understand OOP stuff like C++, because I was more inclined to think procedurally. It used analogies and things that I didn't see right away. With practice, I found that it was actually much easier to do things in OOP languages, because it takes care of much of the bookkeeping for you. Now I love OOP, especially Java, although I still do a lot with non-OOP languages as well. I read a lot of library books and websites with sample code. It was hard for me at first, but after watching how others solved problems, I got the hang of it. The best way I found to solve problems with these OOP languages is to analyze the things involved in the problem, making classes to represent their aspects that are involved in the problem. Then I use the classes to solve the problem similar to how I would in the real world.
     
  3. mastermosley

    mastermosley Sergeant

    I don't program in C++ but this strategy may be useful for you otherwise. When building a program try to get the outline made like each procedure and function that is going to be used. Use comments and comment in each procedure and function what you want it to do. Then go over your comments and try and code them, if you cannot you can go online and figure it out then move onto the next one.

    Also you can try downloading or buying a programming book and try and do the practices. They are pretty detailed and will have you advancing your skills in no time.
     
  4. PC-XT

    PC-XT Master Sergeant

    Thanks for mentioning that development method, mastermosley. That's quite often the way I do it. Also, doing exercises in programming books broadens experience a lot more than just doing a job. If your job changes, you are better able to adapt to the new problems than if you are used to solving only the problems in the first job. Those exercises also break monotony when working on the same type of problem for a long time. :)
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds