C++ All-in-One For Dummies

C++ All-in-One For Dummies

Language: English

Pages: 864

ISBN: 1118823788

Format: PDF / Kindle (mobi) / ePub


Get ahead of the C++ curve to stay in the game

C++ is the workhorse of programming languages and remains one of the most widely used programming languages today. It's cross-platform, multi-functional, and updates are typically open-source. The language itself is object-oriented, offering you the utmost control over data usage, interface, and resource allocation. If your job involves data, C++ proficiency makes you indispensable.

C++ All-in-One For Dummies, 3rd Edition is your number-one handbook to C++ mastery. Author John Paul Mueller is a recognized authority in the computer industry, and your ultimate guide to C++. Mueller takes you through all things C++, including information relevant to the 2014 update.

  • Learn how to work with objects and classes
  • Conquer advanced programming and troubleshooting
  • Discover how lambda expressions can make your code more concise and readable
  • See Standard Library features, such as dynamic arrays, in action

Online resources include source code from examples in the book as well as a C++ GNU compiler. If you need to learn C++, this is the fastest, most effective way to do it. C++ All-in-One For Dummies, 3rd Edition will get you up and running quickly, so you can get to work producing code faster and better than ever.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Classes with Templates............................................................... 529 Chapter 6: Programming with the Standard Library.................................................. 561 Chapter 7: Working with Lambda Expressions........................................................... 599 www.it-ebooks.info Book V: Reading and Writing Files............................. 615 Chapter 1: Filing Information with the Streams Library............................................ 617 Chapter 2:

CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A

output of strings and numbers into a single cout statement. We did this for four of the cout statements. That’s acceptable, as long as you string them together with the << signs between each of them. You have access to all the usual goodies with both the division (/) and remainder (%) operators. For example, you can store the quotient in another variable, as you can with the remainder: myQuotient = first / second; myRemainder = first % second; And you have shortcuts available: int first = 30;

default, cin reads in characters from the console based on spaces. If you put spaces in your entry, only the first word gets read. cin reads the second word the next time the application encounters a cin >>. www.it-ebooks.info Chapter 4: Directing the Application Flow In This Chapter ✓ Comparing numbers and evaluating other conditions ✓ Doing things based on a comparison ✓ Repeating code a certain number of times ✓ Repeating code while certain things are true ✓ Repeating code that repeats

the shortcut -> notation to call the string functions. And don’t dereference anything. There are no pointers. Just type the dot (or period) and the function. No asterisks needed. If you write a function that uses a reference and somebody else uses your function in code (see Book I, Chapter 6, for information on how to do this), you could end up making that other person angry. The other person may not realize that, “Hey, man — this thing just messed up my variable!” WHAM! The variable gets

Download sample

Download