C++ auto type derivation

reference http://c.biancheng.net/view/6984.html Syntax and rules of auto type derivation In previous versions of C + +, the auto keyword was used to indicate the storage type of variables, which is opposite to the static keyword. Auto means that variables are stored automatically, which is also the default rule of the compiler, so it is the ...

Added by TheBeginner on Sun, 27 Feb 2022 02:35:08 +0200

Program environment and preprocessing

catalogue Program translation environment and execution environment Compilation and linking Pretreatment Program translation environment and execution environment In any implementation of ANSI C, there are two different environments. Translation environment and execution environment. Translation environment: in this environment, the ...

Added by Negligence on Sat, 26 Feb 2022 21:55:17 +0200

String + memory function

catalogue Function introduction Simulation Implementation of library function Function introduction strlen: The string ends with '\ 0'. The strlen function returns the number of characters (excluding '\ 0') that appear before '\ 0' in the string. The string pointed to by the parameter must end with '\ 0'. Note that the return value o ...

Added by sBForum on Sat, 26 Feb 2022 21:47:43 +0200

[C + +] detailed explanation of polymorphism

concept Polymorphism, that is, multiple forms, that is, different objects will produce different states when they complete a certain behavior. For example, when buying tickets in the past, ordinary people bought tickets normally, students bought tickets at half price, and soldiers bought tickets first. Definition and Implementation Com ...

Added by xkaix on Sat, 26 Feb 2022 19:04:25 +0200

[Jeremy Wu] adventure Road, ordinary road (C + +) kkmd66

Description: Night Fury is a very rare and most dangerous and intelligent dragon from "master of dragon training 2". It is very different from other dragons in shape. It is similar to bats. At the same time, it combines the size of cats and the sharp eyes of wild wolves, with black scales on its body. The volume is petite, the expres ...

Added by TGM on Sat, 26 Feb 2022 18:18:09 +0200

[C + + improve programming] 3.2 STL common container: vector container

1. string container Please click to jump to this chapter 2. vector container 2.1 basic concept of vector Function: vector data structure is very similar to array, also known as single ended array The difference between vector and ordinary array: Array is static space (the capacity is fixed and cannot be changed after definition)vecto ...

Added by binarylime on Sat, 26 Feb 2022 14:36:55 +0200

AtCoder Beginner Contest 239 A~E

A Problem surface Problem Statement Assuming that the horizon seen from a place x meters above the ground is sqrt(x(12800000+x)) ​ meters away, find how many meters away the horizon seen from a place H meters above the ground is. Carelessness Assuming that the horizon X seen from a place is sqrt (X (128000 + X)) meters away from the ground, fi ...

Added by speedamp on Sat, 26 Feb 2022 08:49:57 +0200

C + + syntax 2 - data types

Basic built-in type Boolean boolCharacter charInteger int(single precision) float ing pointDouble precision floating point doubleNo type voidWide character wchar_t type specifier signedunsignedshortlong Some basic types can be decorated with one or more type modifiers. typedef wchar_t is this: typedef short int wchar_t; So ...

Added by spiyun on Sat, 26 Feb 2022 08:07:19 +0200

What are the possible ways to refactor "arrow" code?

The article comes from Chen Hao So back to business, The so-called arrow code is basically the kind of code shown in the following picture. Countless if's look big. So, what's wrong with this "arrow" code? It also looks good, symmetrical and beautiful. But There are several questions about arrow Codes: 1) If my monitor is not w ...

Added by Sykoi on Sat, 26 Feb 2022 07:39:26 +0200

[C + +] CRTP: singular recursive template mode

  1. What is CRTP? What is CRTP? The full name of CRTP is curiously recursive template pattern, that is, singular recursive template pattern, or CRTP for short. CRTP is a special template technology and usage, which is a common usage in C + + template programming. The characteristics of CRTP are as follows: The base class is a template cla ...

Added by jipacek on Sat, 26 Feb 2022 06:18:31 +0200