Wrox Programmer Forums
|
BOOK: Ivor Horton's Beginning Visual C++ 2010
This is the forum to discuss the Wrox book Ivor Horton's Beginning Visual C++ 2010 by Ivor Horton; ISBN: 9780470500880
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Ivor Horton's Beginning Visual C++ 2010 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 18th, 2010, 11:32 PM
Registered User
 
Join Date: Nov 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Red face Main function at chapter 6, pages 330-331

This is the code main function at at chapter 6, pages 330-331:
Code:
int main()
{
   char buffer[MAX] = {0};    // Input area for expression to be evaluated

   cout << endl
        << "Welcome to your friendly calculator."
        << endl
        << "Enter an expression, or an empty line to quit."
        << endl;

   for(;;)
   {
      cin.getline(buffer, sizeof buffer);   // Read an input line
      eatspaces(buffer);                    // Remove blanks from input

      if(!buffer[0])                        // Empty line ends calculator
         return 0;

      cout << "\t= " << expr(buffer)        // Output value of expression
           << endl << endl;
   }
}
I dont know that this command line:
Code:
if(!buffer[0])
will do what," !buffer[0] ", what does it mean?

Thanks 4 reading...
 
Old November 29th, 2010, 05:46 PM
Registered User
 
Join Date: Nov 2010
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

! - Page 132 - Logical NOT.

The operator is listed in the book's index.





Similar Threads
Thread Thread Starter Forum Replies Last Post
issues with chapter 1- main.php not working on server Boboneil BOOK: PHP and MySQL: Create-Modify-Reuse ISBN: 978-0-470-19242-9 5 April 24th, 2011 10:20 PM
Same pages for sub domain from main domain vivek_inos ASP.NET 1.0 and 1.1 Professional 1 February 13th, 2007 10:15 AM
Main menu function andy_study VB.NET 2002/2003 Basics 2 December 15th, 2004 06:48 PM
Missing Sub Main in Chapter One, Exercise One mmcdonal BOOK: Beginning VB.NET 2nd Edition/Beginning VB.NET 2003 6 October 27th, 2004 06:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.