With Learning C++ by Michael Haephrati and Ruth Haephrati

C++ has been one of the top programming languages for 30 years and it’s not slowing down. It’s never a bad time to learn it, and this book will help you do just that—even if you don’t have any programming or computer science experience.

Read on to find out more.

Take 25% off Learning C++ by entering fcchaephrati into the discount code box at checkout at manning.com.

C++ is alive and kicking and is considered by many to be one of the most powerful and robust programming languages across all platforms. C++ plays a constant major role in evolving technologies of all sorts – from mobile application, web application, communication and networking, desktop applications, and up to the most advanced AI, machine learning, autonomous cars, rocket science and so much more. Everywhere you look, C++ fingerprints are all over it. To use the words of Bjarne Stroustrup, the creator and designer of C++, ” I find it most gratifying that C++ has been used in science: the human genome project, the fundamental physics research at CERN and elsewhere, and the Mars Rovers. It feels great to have made a contribution, however small“.

Why C++ is awesome

Though C++ is considered amongst the most complex programming languages, it is, without a doubt, one of the most rewarding ones to master. C++ is a stable language, used for over 30 years by millions of programmers across the globe – a community which keeps growing strong. Yes, there are easier programming languages out there, yet none of them offer the robustness and capabilities C++ does.

C++ allows you to handle low-level programming, (work close to the actual hardware – this is basically near machine language), along with high-level programming (work close to what the user sees on the screen – WYSIWYG, or “What You See Is What You Get”, also known as user interface). C++ works with both high and low level combined, using layers on top of layers, whilst each layer gives different access level, which is why C++ is also called a general-purpose language. You can say that C++ is a bridge between the actual machine’s metal and the simplicity presented to the end user, who doesn’t always want to be bothered with the stuff “under the hood”.

A C++ state of mind

Learning the basics of C++ is quite simple, while some other advanced features might seem intimidating at first. When starting your journey towards learning C++, you should try to hang on to the logic behind the syntax, the statements, the structure, and how they all co-work together. Hang on to these three especially once you start dealing with more complex code, which sometimes appears to make little or absolutely no sense.

It’s no secret that there is a lot of ‘brain power’ which needs to be invested when dealing with C++, not only when learning it, but when actually using it. Hair pulling is another common C++ side effect. While other programming languages, such as C#, JavaScript or Python are easier to learn and practice, C++ doesn’t give you any discounts. In order to picture the difference, imagine going to the woods, chopping some wood yourself, and building your own one-of-a-kind cabinet from scratch, rather than buying a cabinet from IKEA. With C++ you can do both. Different programming languages give you a tradeoff of either simplicity and easiness, along with little or less work to be done on one hand, or full (or more) control over the code, to its lowest level. If you are into controlling what is performed at the lowest level, C++ is one of the best choices, and with that control, you can always add layers of functionalities on top of that lower level, giving you the simplicity and easiness as well. Some programming languages are simpler, and might allow you to write code faster, think less and worry less, but they have specific limits. It’s like typing using readymade sentences which were pre-prepared for you, rather than in your own words.

Programming provides you with a set of capabilities and tools to convert tasks and ideas into computer programs. These capabilities and tools are wide and different, allowing you to choose your preferred way of implementing what you want a computer program to do. C++ gives you even wider range of options. This book exposes you to these capabilities and, with a hands-on approach, teaches you how to become a programmer, how to choose the path you wish to go when you start working on a task or an idea, and assures you that you have what it takes to make the right choice, keeping in mind that the choice is yours.

Our approach

In this book, we take you on a step-by-step journey, laying out the fundamentals of the most modern C++20, and, at the same time, use a practical and simple approach, so you will not only understand the basics of C++ in theory, but you will also learn how to use your new skills in real-life projects and get your hands “dirty” writing code. We explain the “why”, not only the “how”, so you will understand why things are done a certain way, why a given syntax is constructed a certain way etc.

It is always good to practice how to approach problems logically, and you will find this skill useful, especially with C++. This is true as there are so many ways in C++ to solve the same problem, and the best way is, in most cases, the simplest one. In order to find the simplest way, knowing to code is not enough. The key is to use a lot of logical thinking, which you can develop over time, and this book will help you with that.

The way we see it, writing code is an art. Too many programmers miss out on the beauty and art of programming as they tend to focus on the practicality, they might even see it as the opposite of art. But there is a beautiful philosophical and artistic side to computer programming. We hope you will be able to see that as you deepen your knowledge and expertise.

We believe in simplifying things, and in particular within a given code. There are so many styles for writing code in C++, and our approach is to use the most simple and straightforward logic in order to make it easy for you to learn, understand, and write great code in C++.

Building a solid foundation

The truth is that mastering C++ takes time and most importantly, lots and lots of practice. We will hand-craft your capabilities and make sure you truly understand what you are doing, in order to build a solid ground from which you can grow and nourish your skills. This book will, hopefully, plant the seed from which you will grow your C++ craftsmanship. Once you get the hang of it and gain some confidence, you will be amazed at the level of freedom and creativity C++ can offer you as a programmer, so you could literally create, innovate and build the most amazing programs imaginable.

In this book, we also guide you on how to design, write and develop interesting and practical projects, which will teach you quite a lot and will serve as a great foundation which you can use in your portfolio.

What we expect from you

When reading and using this book we expect you to enjoy the ride. Learning C++ can be a fun challenge, even if it is not an easy one. You should also remember that it can take a while before you start feeling confident and make real progress. No C++ professional became an expert in a few weeks, nor even a few months. Think of it as a long journey – just as if you won’t and cannot expect to speak a new spoken language fluently within a few months, or master playing the piano without years of practice.

Last, never take things for granted. Ask “why” when something isn’t clear. This will lead you to search for the answers which will, eventually, lead you to a better understanding.

What you should expect from this book

In this book we introduced the basics of C++, a programming language for both low- and high-level programming. We also laid out all the good reasons to learn C++, along with the difference between C++ and other programming languages. Moving forward, rest assure we have used our combined experience in order to construct a great learning program which will help you understand and practice C++ from the very basics up to solid skills. If you never wrote code before, or have little to no knowledge in computer science, worry not – we will explain every little concept, term or methodology, and will never take it for granted that you know or understand something unless we thoroughly explain it. It is enough if you have elementary school mathematical skills in order to gain all the benefits from this book, and we are sure you will enjoy reading and learning from it.

Making the most out of this book

Note that this book is aimed at those with NO previous knowledge or experience with any programming language, or even knowledge in the basics of computer science. This book is also suitable for those who have some experience in other programming languages and are new to C++. All you need to do is to follow this book chapter by chapter and practice a lot. You can also find many great programming skill development sites online, with coding exercises and quizzes, which can help you maintain and grow your knowledge through hands-on experience. Learning C++ using a book is very beneficial only if you practice writing real code, and we encourage you to do so.

To get the most from this book, focus on the hands-on parts. Spend more time using your selected development environment (IDE), and, during and after each chapter, try to not only code the exercises in the book, but also try to invent your own programs based on what you have learned. Try to see the fun in each ability and capability you will be introduced to – it will give you the power to turn your ideas into a working program. The best advice we can give you is practice, code, and invent. Practice each topic you will be learning. Exercises and code samples are part of each section; code as many variations of what you learn, not only what you are asked to do, but more. The more the better. Then try to invent other ways, other tasks and other programs using what you have learned. Try to combine different areas and topics from different chapters. When you are working on something you have just learned, try to think: what other things you learned before can be useful now? The best scenario would be using the accumulated knowledge from all previous chapters when working and practicing code based on the current chapter.

This book will provide you all the basic tools and know how in order to start your path towards becoming a great C++ programmer regardless of your previous knowledge or experience in C++ and in programming, in general.

Learn more about the book here.

about the authors

Michael Haephrati, Co-Founder of Secured Globe, Inc. is an inventor, musician, entrepreneur, and a C++ expert, specializing in software development, vulnerabilities research and Cyber Security. Over the last +30 years, Michael has developed a unique perspective and methodology, combining core technologies, creativity and functionality with the end user experience. Back in 1989, Michael developed Rashumon, the first multilingual graphical word processor for the Amiga. Later, he developed various software products and technologies, especially in the field of Video Processing, Cyber Security, Data Cleansing, Data Leak Prevention, DRM, and high-end solutions, for government agencies. Recently, he developed the next generation anti-virus and Malware Detection Technology, used by leading tech companies such as Avaxi LLC. Michael also took part in starting a Web3 based Social Ecosystem. Most of his work is developed using C++. Michael regularly writes in Code Project, Microsoft blogs and Pentest Magazine. He is also a music composer and pianist, who likes traveling and long-distance jogging.

Ruth Haephrati, Co-Founder of Secured Globe, Inc. is an entrepreneur and a cyber security and cyber intelligence expert with vast computer forensics skills. Ruth started her career back in the early 90s and has since taken part in various projects and emerging technologies, starting with Windows based applications, Web application, Computer vision, IOT, Deep learning and more. During her career, Ruth has designed and developed innovative technologies, including some military grade solutions. She recently also led the R&D of a new and innovative Cryptocurrency marketplace. She is also a painter, photographer and loves jogging.