• Call member function of null pointer class without error


    What is the reason for the null pointer instance to call the member function? Guess what happens when the following example runs? class A { public: static void print() { printf(“>>>>>\n”); } void print2() { printf(“+++++\n”); } void print3() { printf(“====%d\n”, value); } private: int value; }; int main(int argc, char *argv[]) { A *a […]

  • Learning notes of autolabor 2.5 (1) — Introduction to autolabor 2.5 car


    Just extrapolated to the graduate student of Beijing University of science and technology, the teacher bought two autolabor 2.5 trolleys as our entry-level learning equipment, and first recorded the overall situation of the trolleys. reference material: Official website of autolabor: http://www.autolabor.com.cn/ 1. Specifications of autolabor 2.5 Carbody material Thickened acrylic On board computer Raspberry pie […]

  • Source code analysis of C + + unique ﹣ PTR (from visual studio 2017)


    Unique PTR is an intelligent pointer with independent object ownership semantics. In other words, the pointer owned by a unique PTR object can only be owned by itself and cannot be shared by multiple objects (I hope you can understand the difference between semantics and syntax rules. Semantically, the pointer of unique PTR is not […]

  • Learning notes of autolabor 2.5 (2) — ROS installation method and related configuration


    The first thing we need to do is to install the ROS operating system. This section will introduce the installation method and related configuration of the ROS operating system. reference material: ROS Wiki:http://wiki.ros.org/ROS ROS Qt Creator Plug-in Wiki:https://ros-qtc-plugin.readth… 1. Confirm the version of ROS to be installed The corresponding relationship between ROS and Ubuntu is […]

  • C. efficiency of “as” and “is” (original CSDN 2017-10-07 11:49:18)


    The 11th long holiday is about to pass. This year, I didn’t go home. I was just watching the Chinese version of C language standard 5.0. I saw the is operator and as operator yesterday. These two symbols are also used in normal projects. I haven’t compared their efficiency. Take advantage of the free time […]

  • [5min +] how do you wear clothes like this? IEnumerable AND IEnumerator


    Series introduction brief introduction [five minute dotnet] is a blog series that uses your fragmented time to learn and enrich. Net knowledge. It contains all aspects that may be involved in the. Net system, such as the small details of C, aspnetcore, and. Net knowledge in microservices. scene You can take out your mobile phone […]

  • Multithreaded web server based on C + + 11


    I wrote a lightweight web server by referring to Linux multithreading server programming and imitating the Muduo used in the book. Source code Github. There are more detailed comments in the code, which can be used as auxiliary materials to see Linux multithreading server programming. Completed Complete the basic TCP (passive connection) library; Simple HTTP […]

  • Using C + + to encapsulate mutex and conditional variables


    In this paper, C + + raii mechanism is used to encapsulate the mutex and condition variables, so that they can automatically manage the life cycle of mutex and condition variables, and avoid the resource leakage caused by manual maintenance. This article uses pthread Library under Linux. mutex MutexLock First, the mutex is encapsulated. The […]

  • Using the skia rendering engine on MacOS


    Ah. This is my second time to use skia. I forget to compile it every time. It’s really hard to build the C + + project environment. It’s really one of the few libraries that I can run, and another is ffmpeg.. Although I forgot to step on it every time, I made up my […]

  • Study notes of autolabor 2.5 (3) — working space and compiling system of ROS


    The main content of this chapter is to elaborate the working space and compiling system of ROS. reference material: ROS Wiki:http://wiki.ros.org/ROS ROS self study note 4 — workspace and compiling system: https://blog.csdn.net/qq_ The following figure shows an engineering structure of ROS, reflecting the relationship between file systems. This is a typical ROS project. Let’s introduce […]

  • Source code analysis of C + + shared u PTR (from visual studio 2017)


    Shared “PTR is a smart pointer to maintain the shared ownership of objects through pointers. Multiple shared PTR objects can occupy the same resource. When the last shared PTR object is destroyed or another pointer is given through operator =, reset() operation, the managed resource will be recycled. Different shared PTR objects that manage the […]

  • Why implement IDisposable interface?


    Background Recently, I found a problem in the intensive reading of CLR via C Chen and effective c Chen. Generally speaking, we achieveIDisposableInterface to release managed and unmanaged resources. However, there is a similar function in the definition of C ා type, which isFinalization device。 At the beginning, I studied C + +. Later, when […]