Home>Network programming tutorial> C/C++ tutorial
All ASP tutorial ASP tutorial ASP.NET tutorial PHP tutorial JSP tutorial C#/CSHARP tutorial XML tutorial Ajax tutorial Perl tutorial Shell tutorial Visual Basic tutorial Delphi tutorial Mobile development tutorial C/C++ tutorial Java tutorial J2EE/J2ME Software engineering
C/C++ tutorial
  • Detailed explanation of examples of three inheritance methods in C++

    Detailed explanation of examples of three inheritance methods in C++

    Detailed examples of three inheritance methods in C++ In the previous section, we saw the definition method of derived classes, using public inheritance. In fact, there are three methods here, namely public inheritance, private inheritance, and protected
    2024-11-06
  • The use and initialization of constant data in C++

    The use and initialization of constant data in C++

    The use of constant data and initialization in C++. The use of constant data members and the concept of initialization constant. We all know it when we learn C language. The keyword is const. The so-called "constant", or variables modified by &q
    2024-11-06
  • How to use C++ friend classes

    How to use C++ friend classes

    How to use C++ friend classes After learning the friend function, let's look at the friend class again. The same principle and usage are the same. If a class A is declared as a friend class of another class B, then all member functions in class A can
    2024-11-06
  • How to use C++ friend functions

    How to use C++ friend functions

    How to use C++ friend functions We all know that private members in a class can only be accessed by member functions in the class and cannot be accessed outside the class. This reflects the encapsulation and concealment ideas of class design in C++, which
    2024-11-06
  • this pointer in C++

    this pointer in C++

    This pointer in C++ This pointer There is a very hidden special pointer in a class, it is the this pointer! Why is it special? Because as long as a class is defined, the system will predefine a pointer named this and pointing to the current object. Althou
    2024-11-06
  • Detailed explanation of C++ shallow copy and deep copy examples

    Detailed explanation of C++ shallow copy and deep copy examples

    C++ shallow copy and deep copy examples detailed explanation of shallow copy and deep copy In the Circle class, the example of the copy constructor explained in the previous section, the copy strategy is consistent with the system default strategy, that i
    2024-11-06
  • Detailed explanation of C++ copy constructor examples

    Detailed explanation of C++ copy constructor examples

    Detailed explanation of C++ copy constructor examples. In C++, the copy constructor has the same name as the class name, and the formal parameter is a reference type of the object of this class. It is called a copy constructor (CopyConstrctor). Like the c
    2024-11-06
  • Destructor in C++

    Destructor in C++

    In addition to the constructor that is automatically called when a class object is created as mentioned in the previous section, the destructor in C++ will also automatically call a function when the object is destroyed. It also has the same name as the c
    2024-11-06
  • Constructor in C++

    Constructor in C++

    Constructor in C++ There is such a special function in C++. It is a function with the same name as the class name in the class and has no return value. As long as we define an object of the class, the system will automatically call it , used to specifical
    2024-11-06
  • Creation and use of C++ objects

    Creation and use of C++ objects

    Creation and use of C++ objects Do you still remember the sentence from the last lesson: "A class is the abstraction and generalization of an object, and an object is the concreteness and instance of a class"? After learning the definition of a
    2024-11-06
  • C++ file reading operation

    C++ file reading operation

    C++ file reading operation C++ uses the iostream header file for input and output. The name of this header file means io stream. So today we are learning to read and write files. In fact, it is also a stream, called a file stream. Therefore, its header fi
    2024-11-06
  • How to open a file in C++

    How to open a file in C++

    How to open a file in C++. If you want to continue reading and writing the file, you must first complete the first step of opening. Then how to open the file in C++? Here you need to use the member function open() in the fstream class to implement the ope
    2024-11-06
  • C++ read and write file operations

    C++ read and write file operations

    C++ read and write file operations File operations in C++ are mainly supported by the following classes, which are: ofstream: file class for write operations (output) (derived from ostream) ifstream: read operations ( input) file class (derived from istre
    2024-11-06
  • C++ standard exception handling class

    C++ standard exception handling class

    C++ standard exception handling class C++ provides us with a standard exception handling class, which is used to throw exceptions when functions in the C++ standard library are executed. The hierarchical structure of the standard exception classes provide
    2024-11-06
  • C++ exception handling mechanism try

    C++ exception handling mechanism try

    C++ exception handling mechanism try catch example detailed explanation C++ provides us with a structured form of more elegant exception handling mechanism. This structured mechanism can separate the normally executed code and exception handling parts of
    2024-11-06