Category:C++

  • C / C + + Programming Notes: switch statement details, knowledge points + code examples

    Time:2021-5-7

    The switch case statement replaces the long if statement that compares a variable to multiple integer values A switch statement is a multi branch statement. It provides a simple way to assign execution to different parts of the code based on the value of the expression. A switch is a control statement that allows a […]

  • Notes on C + + primer Chapter 6 functions

    Time:2021-5-5

    Any two formal parameters cannot have the same name, and the local variables in the outermost scope of the function cannot use the same name as the formal parameters of the function (the formal parameters are equivalent to the local variables of the function). Parameter names are optional, but since we cannot use unnamed parameters, […]

  • C + + STL priority queue_ queue)

    Time:2021-5-4

    std::priority_queue Priority queue   1、firstThe element is alwaysmaximumElements. 2. It has heap like features, in which elements can be inserted at any time.    3. SupportSubscript access(random access iterator) The implementation inside the priority queue needs to rely onFoundation vesselThe container should be passablerandom access iterators Access and need to support the following operations empty( ) […]

  • [C / C + + learning route] (Part 2): what to learn after learning C / C + + Grammar?

    Time:2021-5-3

    After learning C / C + + Grammar, I believe many friends will be confused. What should they learn? In fact, to sum up, it is nothing more than: 1. Network programming; 2. Operating system; 3. Database; 4. Data structure and basic algorithm; In the last article, we talked about network programming and operating system. […]

  • How to reduce C + + code compilation time!

    Time:2021-5-2

    C++   The code includes two parts: header file and implementation file,   Header files are generally provided for others to use,   But once the header file changes, no matter how small, all the files that reference it must be recompiled, which takes time. If you do a large project (such as the development […]

  • C / C + + Programming Notes: function part! Teach you how to understand and use functions

    Time:2021-5-1

    A function is a set of statements that accept input, perform specific calculations, and produce output. The idea is to put together some common or repetitive tasks and create a function so that we can call the function instead of writing the same code over and over again for different inputs.   The general form […]

  • Chinese coding in QT cross platform programming

    Time:2021-4-30

    preface in useQt5In the process of development, we encountered some cross platform Chinese code conversion problems, and then conducted a survey. Here is a summary, hoping to help others Character encoding First of all, let’s know about Unicode. Unicode is a character set standard issued by Microsoft and other well-known companies. There are three coding […]

  • Introduction to STL

    Time:2021-4-29

    1、 Basic concepts STL (Standard Template Library) is the general name of a series of software developed by HP lab. Now it mainly appears in C + +, but it has existed for a long time before it was introduced into C + +. Generally speaking, STL can be divided into three categoriesAlgorithm, container and […]

  • STL_ String container

    Time:2021-4-28

    1、 String concept String is a string type of STL, which is usually used to represent a string. Before using string, strings are usually represented by char *. String and char * can both be used to represent strings, so what’s the difference between them. Comparison between string and char *: String is a class […]

  • STL_ Vector container

    Time:2021-4-27

    1、 Introduction to vector container A vector is a container that manages elements in a dynamic array. Vector can access elements randomly (support direct access to index values, using the [] operator or at () method). Adding or removing elements from the tail of a vector is very fast, but it takes time to insert […]

  • Notes of C + + primer Chapter 7 classes

    Time:2021-4-26

    The declaration of a member function must be inside the class, and its definition can be inside or outside the class. As part of the interface, non member functions are defined and declared outside the class. Functions defined inside a class are implicit inline functions. The member function accesses the object that calls it with […]

  • The Internet share option of network card is set automatically by program

    Time:2021-4-25

    Operating system: Windows 10_ X64 [version 10.0.19042.685] Windows can access the Internet through network card sharing, but it needs to be set in the properties of network card, and it needs to be operated in the window interface, which can not achieve automation.     Check the following information, can be achieved through inetsharingmanager, the […]