2,99 €
This title is one of the "Essentials" IT Books published by TechNet Publications Limited.
This Book is a very helpful practical guide for beginners in the topic , which can be used as a learning material for students pursuing their studies in undergraduate and graduate levels in universities and colleges and those who want to learn the topic via a short and complete resource.
We hope you find this book useful in shaping your future career.
This book will be available soon...
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Veröffentlichungsjahr: 2016
Table of Contents
The Story behind the Succinctly Series of Books
About the Author
Introduction
Preface
Chapter 1 Types
Chapter 2 Namespaces
Chapter 3 Functions and Classes
Chapter 4 Storage Duration
Chapter 5 Constructors, Destructors, and Operators
Chapter 6 Resource Acquisition is Initialization
Chapter 7 Pointers, References, and Const-Correctness
Chapter 8 Casting in C++
Chapter 9 Strings
Chapter 10 C++ Language Usages and Idioms
Chapter 11 Templates
Chapter 12 Lambda Expressions
Chapter 13 C++ Standard Library
Chapter 14 Visual Studio and C++
Detailed Table of Contents
Introduction
C++ Succinctly was written to help professional C# developers learn modern C++ programming. The aim of this book is to leverage your existing C# knowledge in order to expand your skills. Whether you need to use C++ in an upcoming project, or simply want to learn a new language (or reacquaint yourself with it), this book will help you learn all of the fundamental pieces of C++ so you can understand projects and samples written in C++ and begin writing your own C++ programs.
As with any large subject, there simply wasn’t room to cover everything (an example being the new atomic features added in C++11), and others might have decided to order the topics differently. I’m thinking particularly of pointers, a topic I cover in depth only further into the book. They are important, so some might have chosen to cover them earlier, but I feel you do not need to understand pointers to understand the material that precedes their coverage; understanding the preceding topics will make it much easier for you to understand them.
I’ve done my best to be as accurate as possible without sounding like a language specification or documentation file. I hope I have succeeded. I consulted the C++11 language specification frequently while writing this, and I also read everything from StackOverflow posts, to MSDN docs, to GCC docs, and beyond. There are areas where I intentionally simplified things. As you continue to expand your knowledge of C++, you will undoubtedly reach issues where you need to have a more comprehensive understanding in order to accomplish your goal or eliminate a bug. If reading this book imparts enough knowledge—and a good-enough feel for the language that you are able to recognize, diagnose, and resolve those issues—then I will be content that I have succeeded in my goals. Welcome to C++!
Classes and Structures
The difference between a class and a structure in C++ is simply that a structure’s members default to public whereas a class' members default to private. That's it. They are otherwise the same. There is no value-type versus reference-type distinction as there is in C#.
That said, typically you will see programmers use classes for elaborate types (combinations of data and functions) and structures for simple data-only types. Normally, this is a stylistic choice that represents the non-object-oriented origins of structure in C, making it easy to differentiate quickly between a simple data container versus a full-blown object by looking to see if it's a structure or a class. I recommend following this style.
Note: An exception to this style is where a programmer is writing code that is meant to be used in both C and C++. Since C does not have a class type, the structure type might instead be used in ways similar to how you would use a class in C++. I’m not going to cover writing C-compatible C++ in this book. To do so, you would need to be familiar with the C language and the differences between it and C++. Instead, we are focusing on writing clean, modern C++ code.
In Windows Runtime (“WinRT”) programming, a public structure can only have data members (no properties or functions). Those data members can only be made up of fundamental data types and other public structures—which, of course, have the same data-only, fundamental, and public-structures-only restrictions. Keep this in mind if you are working on any Metro-style apps for Windows 8 using C++.