Introduction to C + + language Chapter 4 - class 4.5 level
4.5 level
Container is a very simple example of class hierarchy. The so-called class hierarchy refers to a group of classes created by derivation (such as public), which are arranged in order in the lattice. We use class hierarchy to represent concepts with hierarchical relationship, such as "fire truck is a kind of truck, truck is a ...
Posted by teo99 on Wed, 02 Mar 2022 08:20:28 +0100
log4cpp source code reading: Category component learning
The category component is a real Logging object in the Log4Cpp library. We can use the category object to perform various levels of log operations, such as debug, warn, info... And this object can also add various Appenders to distribute log instructions to various appender objects to output to the final destination
Relationship between Catego ...
Posted by MasterACE14 on Wed, 02 Mar 2022 04:23:52 +0100
C + + - multithreading (async, future, packaged_task, promise)
Introduction background
If you want to receive the return value of sub threads in the main thread, or realize the information transfer between sub threads, you may use the future object at this time. Using this object requires the introduction of relevant header files.
#include <future>
We will use the future object to rec ...
Posted by geowulf on Tue, 01 Mar 2022 23:46:22 +0100
Linear table - 04 stack
Write before: Today, let's learn about the stack structure. The stack can also be called directly in C + + STL, but we can use C + + to realize the stack structure.
Definition of stack
The stack meets the principle of "first in and last out", that is, it can only be inserted and deleted from the tail. The implementation of the sta ...
Posted by rReLmy on Tue, 01 Mar 2022 12:12:51 +0100
On template and paradigm programming in C + +
preface
Recently, I have been reading the book "Effective C + +" 55 specific ways to improve program and design. It seems that there are some gains after reading it again and again. These classic books are and read repeatedly. Some ambiguous contents will be understood slowly over time. The first one is to regard C + + as a fe ...
Posted by pointsplat on Mon, 28 Feb 2022 17:57:32 +0100
C + + should learn with a smile: Reference&
๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ Rush subscription ๐ ย ย C + + learn with a smile ย ย ๐ Interesting teaching blog ๐ฅ ๐ฅ ๐ฅ ๐ฅ ๐ฅ
Write before:
Ah, Hello, friends. I'm lemon leaf C. This chapter will explain the basis of C + + and quote some knowledge.
In some places, in order to deepen our understanding, we will give some interestin ...
Posted by twoeyes on Mon, 28 Feb 2022 05:34:31 +0100
55 specific methods of Effective C + + to improve program and design
preface
Almost every class we write will have one or more constructors, a destructor and a copy assignment operator. It's hard to be particularly excited about these. After all, they are your basic tools for making a living, controlling basic operations, such as producing a new object and ensuring that it is initialized, getting rid of t ...
Posted by kaser on Mon, 28 Feb 2022 03:26:38 +0100
printf segment error (core dump): a problem caused by formatted output
1. printf segment error (core dump): a problem caused by formatted outputPost a simple example:#include <stdio.h>
int main(){
int len = sizeof(int);
printf("%s\n",len);
return 0;
}
`root@ubuntu:test#gcc test.c test.c: In function 'main':test.c:5:2: warning: format '%s' expects argument of type 'char *', but argument 2 has typ ...
Posted by anthill on Mon, 28 Feb 2022 02:45:27 +0100
C + + wide and narrow character conversion and output
Catalogue of series articles
1. Implement crawler with C + +!
preface
If you are a C/C + + programmer, you should be no stranger to VS. it can be said to be a sharp weapon in the hands of C/C + + programs
However, if you study deeply, you will find that most windows API s are divided into wide bytes and narrow bytes, such as the commo ...
Posted by phpcoding2 on Mon, 28 Feb 2022 02:26:01 +0100
4, Classes and objects
4 classes and objects
The three characteristics of C + + object-oriented are encapsulation, inheritance and polymorphism
C + + believes that everything is an object, and the object has its properties and behavior
For example:
People can be objects. Their attributes include name, age, height, weight... And their behaviors include walking, ru ...
Posted by krystof78 on Mon, 28 Feb 2022 02:17:14 +0100