当前位置:网站首页>U++ operator learning notes
U++ operator learning notes
2022-06-22 14:52:00 【It's a bald rabbit】
assignment := This copy is a deep copy
TArray<int32> ValArr3;
ValArr3.Add(1);
ValArr3.Add(2);
ValArr3.Add(3);
auto ValArr4 = ValArr3;
// ValArr4 == [1,2,3];
ValArr4[0] = 5;
// ValArr3 == [1,2,3];
// ValArr4 == [5,2,3];Append Substitution of functions operator+=:
ValArr4 += ValArr3;
// ValArr4 == [5,2,3,1,2,3]MoveTemp: Mobile construction : It is the product of distinguishing left value from right value , Give one object directly to another , And destroy ( Master Guixi , Pass all your internal power to your disciple ), The time complexity is O(1).
ValArr3 = MoveTemp(ValArr4);
// ValArr3 == [5,2,3,1,2,3]
// ValArr4 == []Operator==: compare
TArray<FString> FlavorArr1;
FlavorArr1.Emplace(TEXT("Chocolate"));
FlavorArr1.Emplace(TEXT("Vanilla"));
// FlavorArr1 == ["Chocolate","Vanilla"]
auto FlavorArr2 = Str1Array;
// FlavorArr2 == ["Chocolate","Vanilla"]
bool bComparison1 = FlavorArr1 == FlavorArr2;
// bComparison1 == true
for (auto& Str : FlavorArr2)
{
Str = Str.ToUpper();
}
// FlavorArr2 == ["CHOCOLATE","VANILLA"]
bool bComparison2 = FlavorArr1 == FlavorArr2;
// bComparison2 == true, because FString comparison ignores case
Exchange(FlavorArr2[0], FlavorArr2[1]);
// FlavorArr2 == ["VANILLA","CHOCOLATE"]
bool bComparison3 = FlavorArr1 == FlavorArr2;
// bComparison3 == false, because the order has changed边栏推荐
- 世界上所有的知名网络平台
- Messiari annual report-2021
- Struggle, programmer -- Chapter 44: eight hundred miles under one's command, fifty strings turning over the Great Wall
- Is the encryption market a "natural disaster" or a "man-made disaster" in the cold winter?
- Unity sub thread calls UI of main thread
- 擴散模型又殺瘋了!這一次被攻占的領域是...
- 树结构二叉树
- Software architecture
- Thoroughly understand the factory mode
- Introduction to groovy syntax
猜你喜欢

Neuron+ekuiper realizes data collection, cleaning and anti control of industrial Internet of things

作为程序员,职业规划需要注意的四个阶段

visual studio开发过程中常见操作

利用图片实现APP元素定位sikulix

成都测试设备开发_单片机C语言之数组介绍

网络地址转换NAT

Vcip2021: super resolution using decoded information

Database employment consulting system for your help

UE4 通过蓝图获取本地文件

Biden signe deux nouvelles lois visant à renforcer la cybersécurité du Gouvernement
随机推荐
[Software Engineering] planning and project management
一文彻底弄懂工厂模式(Factory)
D security can call the system
U++ 运营商 学习笔记
Flutter video Le lecteur écoute et joue automatiquement la prochaine chanson
Biden signe deux nouvelles lois visant à renforcer la cybersécurité du Gouvernement
C# Winform 相册功能,图片缩放,拖拽,预览图分页
一篇博客让你了解Material Design的使用
d的嵌套赋值
No wonder the postgraduate entrance examination is so hot. These are the "hidden benefits" of Postgraduates!
Excuse me, is Zhongyan futures reliable? Is the fund safe?
Shan Zhiguang, chairman of BSN Development Alliance: DDC can provide the underlying support for the development of China's meta universe industry
How to compare the size of two dates in unity and C #
Fluentd is easy to get started. Combined with the rainbow plug-in market, log collection is faster
We will resolutely fight and win the hard battle of flood control and disaster relief and spare no effort to ensure the safety of people's lives and property
难怪考研热度这么高,这些是研究生才有的“隐藏福利”!
unity防止按钮btn被连续点击
拜登簽署兩項旨在加强政府網絡安全的新法案
Common real machine debugging plug-ins for unity commercial games
[untitled]