Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Beginning C++ Programming

You're reading from   Beginning C++ Programming Modern C++ at your fingertips!

Arrow left icon
Product type Paperback
Published in Apr 2017
Publisher Packt
ISBN-13 9781787124943
Length 526 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Richard Grimes Richard Grimes
Author Profile Icon Richard Grimes
Richard Grimes
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface 1. Starting with C++ FREE CHAPTER 2. Understanding Language Features 3. Exploring C++ Types 4. Working with Memory, Arrays, and Pointers 5. Using Functions 6. Classes 7. Introduction to Object-Orientated Programming 8. Using the Standard Library Containers 9. Using Strings 10. Diagnostics and Debugging

What is C++?

The predecessor of C++ is C, which was designed by Dennis Richie at Bell Labs and first released in 1973. C is a widely used language and was used to write the early versions of Unix and Windows. Indeed, the libraries and software-development libraries of many operating systems are still written to have C interfaces. C is powerful because it can be used to write code that is compiled to a compact form, it uses a static type system (so the compiler does the work of type checking), and the types and structures of the language allow for direct memory access to computer architecture.

C, however, is procedural and based on functions, and although it has record types (struct) to encapsulate data, it does not have object-like behaviors to act on that encapsulated state. Clearly there was a need for the power of C but the flexibility and extensibility of object-oriented classes: a language that was C, with classes. In 1983, Bjarne Stroustrup released C++. The ++ comes from the C increment operator ++.

Strictly, when postfixed to a variable, the ++ operator means increment the variable, but return the variable's value before it was incremented. So the C statements int c = 1; int d = c++; will result in variable d having a value of 1 and variable c having a value of 2. This does not quite express the idea that C++ is an increment on C.
You have been reading a chapter from
Beginning C++ Programming
Published in: Apr 2017
Publisher: Packt
ISBN-13: 9781787124943
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime