home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c++.moderated      Moderated discussion of C++ superhackery      33,346 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 32,975 of 33,346   
   nvangogh to Francis Glassborow   
   Re: calculate 'average price' problem   
   05 Apr 13 10:37:07   
   
   From: nvangogh@invalid.net   
      
   On 30/03/13 12:33, Francis Glassborow wrote:   
   > On 29/03/2013 20:37, nvangogh wrote:   
   >> The program is simple - C++ primer 5th edition exercise 7.1   
   >> Program should take 3 input values:   
   >> - a 'isbn' - std::string   
   >> - number of copies sold - unsigned int   
   >> - sales price per unit - double   
   >>   
   >   
   > I have just looked up that exercise and here is what was set by the   
   > author:   
   >   
   > Write a version of the transaction-processing program from section 1.6   
   > (p 24) using the Sales_data class you defined for the exercises in   
   > section 2.6.1 (p 75)   
   >   
   > Note that   
   > 1) The authors are using functions   
   > 2) The authors expect you to be using classes   
   >   
   > Your code is so far from the authors' expectations as to be   
   > non-responsive to the question EVEN if it worked.   
   >   
   > Assuming that this really is the book you are using then you need to   
   > start again because you have clearly not understood the first six   
   > chapters.   
   >   
   > Sorry to be harsh, but I am well familiar with the book and understand   
   > how it builds on a number of problems so that the reader can   
   > understand how the techniques being introduced work to keep   
   > programming simple and easy to understand. By chapter 7 your code   
   > should be much much cleaner and comprehensible.   
   >   
   > Francis   
   >   
   >   
   For the record, I should point out that the advice that Francis has   
   provided here is - of course correct and I sincerely apologise if any   
   arrogance was read from my earlier post. Reviewing material in earlier   
   chapters made me ashamed to see that I did not understand what I thought   
   I did.   
      
   I have found that each section requires very careful reading, otherwise   
   misunderstandings will result. Indeed, C++ primer is one of the most   
   helpful books on C++ that I have read so far.   
      
   Kind regards   
      
      
   --   
         [ See http://www.gotw.ca/resources/clcm.htm for info about ]   
         [ comp.lang.c++.moderated.    First time posters: Do this! ]   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca