Learning Python – Creating and Using Class Objects

A class is the core concept of object-oriented programming in Python. Below, I will comprehensively introduce how to create and use class objects. 1. Basic Structure and Creation of Classes 1. The Simplest Class class EmptyClass: pass # Empty class, using pass as a placeholder # Create object instance obj = EmptyClass() print(obj) # Output: … Read more

Introduction to C++ Classes and Objects

Introduction to C++ Classes and Objects

1. Preliminary Understanding of Procedural and Object-Oriented ProgrammingThe C language is procedural, focusing on processes, analyzing the steps to solve problems, and gradually solving problems through function calls.●C++ is object-oriented, focusing on objects, breaking down a task into different objects, and completing it through interactions between objects.2. Introduction to Classes●In C language, a structure can … Read more

Introduction to Object-Oriented Programming in Embedded C++

Introduction to Object-Oriented Programming in Embedded C++

Follow our official account to keep receiving embedded knowledge! 1. Comparison of Object-Oriented and Procedure-Oriented Programming Imagine you want to build a house. Procedure-Oriented: It’s like you are doing everything yourself. Your thinking is linear: “First, I will move bricks -> then mix cement -> next, build walls -> finally, put on the roof.” You … Read more

Overview of C++

Overview of C++

C++ (C Plus Plus) is an object-oriented high-level programming language that extends and upgrades the C language. It was developed in 1979 by Bjarne Stroustrup at AT&T Bell Labs. Initially, C++ was referred to as “C With Classes”. It is a general-purpose programming language that supports static data type checking and multiple programming paradigms, including … Read more

Learning Python – Object-Oriented Programming (OOP)

Learning Python - Object-Oriented Programming (OOP)

Object-Oriented Programming (OOP) is a programming paradigm that uses “objects” to design software and applications. Let’s delve into understanding Object-Oriented Programming in Python. 1. Core Concepts of Object-Oriented Programming 1. Class and Object Class: A blueprint or template for objects, defining the properties and methods of the object. Object: An instance of a class, having … Read more

C++ Design Patterns

C++ Design Patterns

Introduction In the development process, as the amount of project code increases, the difficulty of maintenance and extension gradually rises. How to design the structure of the code to decouple it, facilitate extension and maintenance, and ease team collaboration is a significant challenge. Design patterns were proposed to address this issue. The design patterns built … Read more

A Comprehensive Self-Learning Path for C++: From Beginner to Pro

A Comprehensive Self-Learning Path for C++: From Beginner to Pro

Phase 1: Mastering C/C++ Basics Week 1: Introduction and Environment Setup (4 hours)Set up the C/C++ development environment, learn basic output (print), variable definition, input methods, and conditional statements to establish a fundamental understanding of the language.Week 2: Core Syntax Learning (5 hours)Systematically master data types, operators and expressions, program execution structures (sequential, loop, branch), … Read more

Tutorial: How to Override Virtual Functions in VC++ 6.0

Tutorial: How to Override Virtual Functions in VC++ 6.0

VC++ 6.0 is a visual C++ integrated development environment launched by Microsoft, primarily used for Windows program development. VC++ 6.0 supports polymorphism through the overriding of virtual functions, making it easier to build flexible object-oriented programs. So, how do you override virtual functions in VC++ 6.0? Below, I will introduce the steps to override virtual … Read more

Top Ten Best Practices for Designing and Implementing C++ Classes

Top Ten Best Practices for Designing and Implementing C++ Classes

From WeChat Official Account: DeepNoMind Author: Yu Fan C++ code offers sufficient flexibility, making it challenging for most engineers to grasp. This article introduces ten best practices to follow for writing good C++ code and provides a tool at the end to help analyze the robustness of C++ code. Original text: 10 Best practices to … Read more

The Correct Way to Open Python Classes: The First Step from Beginner to Advanced

The Correct Way to Open Python Classes: The First Step from Beginner to Advanced

Most people learning Python get stuck on “classes” at some point. When first encountering them, many feel, “This is so abstract, like the legendary programming black magic?” 😵 Don’t panic; classes are not that mysterious. You can think of them as common “molds” or “templates” in life. Just like a tailor needs a template to … Read more