关于编译器生成默认构造函数的一些误区

When a class we write does not explicitly provide a constructor but the compiler needs a constructor (be sure to note this phrase), the compiler will generate one for us. However, the default constructor generated by the compiler does not meet our expectations of what it can accomplish.

Read more »

进程间通信

The methods for achieving inter-process/thread communication include:

  1. Inter-process communication methods: file mapping, shared memory, anonymous pipes, named pipes, message slots, clipboard, dynamic data exchange, object linking and embedding, dynamic link libraries, remote procedure calls, etc.
  2. Thread synchronization methods: events, critical sections, mutexes, semaphores.
Read more »

C++11的语法糖

From C language to C++03, the OO features feel absolutely great. Recently, I focused on the new features of C++11 and found many fantastic syntactic sugars! It’s also very enjoyable to use.

Read more »

详细分析C++中的类型转换

In C++, when the operand types of an operator are inconsistent, these operands will be converted to the same type. Type conversion is divided into implicit conversion and explicit conversion.

Read more »

C/C++中占位修饰符*的用法

In the process of solving problems, I came across this code snippet for formatting output: printf("%*s%s%*s\n",__________);
The required output format is: ________123456________//The underscores represent spaces

Read more »