当前位置:网站首页>For (Auto A: b) and for (Auto & A: b) usage
For (Auto A: b) and for (Auto & A: b) usage
2022-07-02 19:51:00 【My. Chicken with vegetables for scientific research】
The difference between the two usages
- for(auto a:b) in b For a container , The effect is to use a Traverse and get b Every value in the container , however a Can't affect b Elements in the container .
- for(auto &a:b) A reference symbol is added in the , You can assign values to the contents of the container , Through a Assignment to do container b Fill in the content of .
Test code
#include<iostream>
using namespace std;
int main()
{
int i[10]边栏推荐
- 【Hot100】21. 合并两个有序链表
- Introduction to program ape (XII) -- data storage
- Solution: vs2017 cannot open the source file stdio h main. H header document [easy to understand]
- AcWing 1135. 新年好 题解(最短路+搜索)
- 嵌入式(PLD) 系列,EPF10K50RC240-3N 可编程逻辑器件
- R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线(indifference curve)
- What are the benefits of multi terminal applet development? Covering Baidu applet, Tiktok applet, wechat applet development, and seizing the multi platform traffic dividend
- PXE installation "recommended collection"
- AcWing 343. Sorting problem solution (Floyd property realizes transitive closure)
- Chapter 7 - class foundation
猜你喜欢

Build a master-slave mode cluster redis

HDL design peripheral tools to reduce errors and help you take off!

Development skills of rxjs observable custom operator

Kt148a voice chip IC user end self replacement voice method, upper computer

Automatically generate VGg image annotation file
![[NLP] a detailed generative text Abstract classic paper pointer generator](/img/d8/a367c26b51d9dbaf53bf4fe2a13917.png)
[NLP] a detailed generative text Abstract classic paper pointer generator

Notes on hardware design of kt148a voice chip IC

KT148A语音芯片ic的软件参考代码C语言,一线串口

自動生成VGG圖像注釋文件

rxjs Observable 自定义 Operator 的开发技巧
随机推荐
多端小程序开发有什么好处?覆盖百度小程序抖音小程序微信小程序开发,抢占多平台流量红利
R语言使用econocharts包创建微观经济或宏观经济图、indifference函数可视化无差异曲线(indifference curve)
c语言链表--待补充
pxe装机「建议收藏」
自动化制作视频
HDL design peripheral tools to reduce errors and help you take off!
Notes on hardware design of kt148a voice chip IC
AcWing 1131. Saving Private Ryan (the shortest way)
高并发下如何避免产生重复数据?
GCC: Graph Contrastive Coding for Graph Neural NetworkPre-Training
Solution: vs2017 cannot open the source file stdio h main. H header document [easy to understand]
【Hot100】21. 合并两个有序链表
接口测试到底怎么做?看完这篇文章就能清晰明了
AcWing 903. 昂贵的聘礼 题解(最短路—建图、dijkstra)
Motivation! Big Liangshan boy a remporté le prix Zhibo! Un article de remerciement pour les internautes qui pleurent
Self-Improvement! Daliangshan boys all award Zhibo! Thank you for your paper
嵌入式(PLD) 系列,EPF10K50RC240-3N 可编程逻辑器件
JASMINER X4 1U deep disassembly reveals the secret behind high efficiency and power saving
AcWing 1125. Cattle travel problem solution (shortest path, diameter)
简书自动阅读