Help Required! - Page 2
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Page 2 of 2 FirstFirst 12
Results 16 to 20 of 20

Thread: Help Required!

  1. #16
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    Re: Help Required!

    Given individually, each question could be a fairly easy one-night homework assignment at some point during a first semester course....
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009
    In theory, there is no difference between theory and paractice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  2. #17
    Join Date
    Mar 2008
    Posts
    9

    Re: Help Required!

    Well thats the problem, i am just a high school student trying to learn C++ by myself, searching in google, youtube and etc.

  3. #18
    Join Date
    Mar 2002
    Location
    NY, USA
    Posts
    12,097

    Re: Help Required!

    Quote Originally Posted by sotito View Post
    Well thats the problem, i am just a high school student trying to learn C++ by myself, searching in google, youtube and etc.

    The age is NOT a problem (I learned programming back in 1972 - in eigth grade - assembler on a minicomuter).

    Failing to have a good study plan IS the problem [and seems so common these days with people of all ages...]


    1) Get a GOOD Book (Yes, the kind on printed paper)
    2) Read EVERY word...in order..no browsing or skimming
    3) Manually Type In EVERY line of code (even if it comes with a CD/DVD
    4) Step through every line of code with the debugger.
    5) At the end of each chapter write your own (Silly) program that uses the topic. Step through EVERY line.
    6) When you are sure that you have mastered EVERYTHING in the chapter, then and only then do you move to the next chapter.

    C++ is a very detailed oriented language. Many times there will be a single sentence in a book that is critical to understanding, and if you skip any of the above steps you are likely to make false assumptions (especially if you HAVE programmed in another language). This error will corrupt the remainder of your thinking process.

    Based on people I have trained over the last 15 years in C++; plan on spending about 200-300 hours in order to become a "novice" C++ programmer.
    TheCPUWizard is a registered trademark, all rights reserved. (If this post was helpful, please RATE it!)
    2008, 2009
    In theory, there is no difference between theory and paractice; in practice there is.

    * Join the fight, refuse to respond to posts that contain code outside of [code] ... [/code] tags. See here for instructions
    * How NOT to post a question here
    * Of course you read this carefully before you posted
    * Need homework help? Read this first

  4. #19
    Join Date
    Mar 2008
    Posts
    9

    Re: Help Required!

    Hmmm that seems pretty interesting, i will surely follow your advice, Thanks! :0

  5. #20
    Join Date
    Apr 1999
    Posts
    27,427

    Re: Help Required!

    Quote Originally Posted by sotito View Post
    Wow wish i was that fast.....
    C++ experts are ones who write the books and/or have many years of professional experience in proper C++ (STL, algorithms, usage of functors, etc.). Unless you're one of these people, then a reasonable goal would be to get a question like number 3 done within a day, if you're an intermediate C++ programmer who has studied C++ properly.

    Don't be too hard on yourself. As an example, a 'C' programmer, regardless of their experience, and who has only used C++ as a "better 'C'", would not complete the assignment as I outlined it in a day (unless they are very fast learners). They may be able to hack a 'C' solution in a short time, but since this is supposed to be a C++ exam, 'C' or C-like solutions shouldn't have been accepted (at least IMO).

    Here is a brief synopsis of the other questions.

    Question 1) just test basic knowledge of pointers, arrays, and loops.

    Question 2 is similar to question 3. The pattern is to set up a struct, and write functors and use std::for_each() (maybe some std::vectors thrown in to store the returned info).

    Question 5 (the perfect numbers) can be easily written once question 4 is answered (the formula for perfect numbers involves primes numbers). You basically lift a lot of the code from question 4 (google for the formula for a perfect number).

    Question 6) needs a little more explanation, and is the toughest of all the questions, depending on what the requirements really are. I don't know if it would involve parsing input and writing your own recursive descent parser to process the input. Most likely, you will need to do some infix to postfix processing in the code to do the arithmetic. This definitely requires more knowledge than just C++ programming.

    Regards,

    Paul McKenzie

Page 2 of 2 FirstFirst 12

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center