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,959 of 33,346   
   Francis Glassborow to nvangogh   
   Re: calculate 'average price' problem   
   30 Mar 13 05:33:21   
   
   From: francis.glassborow@btinternet.com   
      
   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   
      
      
   --   
         [ 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