Thread: Calculator from Bjarne Stroustrup's book

  1. #1
    Registered User
    Join Date
    Sep 2012

    Calculator from Bjarne Stroustrup's book

    I'm currently reading Bjarne Stroustrup's book:"C++ Programming Language - third edition". In chapter 6, he introduce a calculator program and I don't fully understand the program yet (but soon - I'm still quite the beginner in programming). I have the feeling that this is a RPN calculator, but I'm not sure, that is why I want confirmation whether it is one.

    Here is the code from the book: calc.cpp

  2. #2
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    The very first sentence in chapter 6:
    Statements and expressions are introduced by presenting a desk calculator program that provides
    the four standard arithmetic operations as infix operators on floating-point numbers.
    So it's not RPN.
    The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. libraries in Bjarne Stroustrup's book wont work
    By shintaro in forum C++ Programming
    Replies: 2
    Last Post: 07-31-2011, 01:07 PM
  2. Replies: 5
    Last Post: 09-05-2005, 06:26 AM
  3. calculator program from Bjarne Stroustrup's book
    By deduct in forum C++ Programming
    Replies: 4
    Last Post: 03-21-2003, 01:43 AM
  4. Bjarne Stroustrup
    By mithrandir in forum A Brief History of
    Replies: 8
    Last Post: 08-11-2001, 06:41 PM