Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2007-10-09 18:21:11


Author: steven_watanabe
Date: 2007-10-09 18:21:10 EDT (Tue, 09 Oct 2007)
New Revision: 39866
URL: http://svn.boost.org/trac/boost/changeset/39866

Log:
made example/runtime_unit.cpp a little more friendly by adding a prompt
Text files modified:
   sandbox/units/libs/units/example/runtime_unit.cpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: sandbox/units/libs/units/example/runtime_unit.cpp
==============================================================================
--- sandbox/units/libs/units/example/runtime_unit.cpp (original)
+++ sandbox/units/libs/units/example/runtime_unit.cpp 2007-10-09 18:21:10 EDT (Tue, 09 Oct 2007)
@@ -34,7 +34,7 @@
     known_units["foot"] = conversion_factor(boost::units::foot_base_unit::unit_type(), boost::units::SI::meter) * boost::units::SI::meters;;
     std::string output_type("meter");
     std::string input;
- while(std::cin >> input) {
+ while((std::cout << ">") && (std::cin >> input)) {
         if(input == "exit") break;
         else if(input == "help") {
             std::cout << "type \"exit\" to exit\n"


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk