Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the knowledge points quoted in C++?

Shulou Source: shulou.com Published: 2022-06-01 10:46:38 11月15日 Update

This article mainly explains "what are the knowledge points quoted in C++", interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn what are the knowledge points quoted in C++!

The concept of citation

A reference is not a new definition of a variable, but an alias to an existing variable, and the compiler does not open up memory space for the reference variable, which shares the same memory space as the variable it references.

For example, Li Kui is called "iron cow" at home and "black whirlwind" in rivers and lakes. Then the "iron cow" and "black whirlwind" here are called Li Kui's citation.

In the program, the use of references is as follows:

Type & reference variable name (object name) = reference entity

For example:

Void TestRef () {int a = 10; int& ra = a tactic /

Tags: Variables pointers types entities compilers spaces aliases parameters permissions functions statements differences memory addresses constants compilers knowledge knowledge points clocking that is Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Linux Huawei Redmi MySQL