当前位置:网站首页>U++ 运营商 学习笔记
U++ 运营商 学习笔记
2022-06-22 13:22:00 【是秃头的兔子呀】
赋值:=该拷贝为深拷贝
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函数的代替方法operator+=:
ValArr4 += ValArr3;
// ValArr4 == [5,2,3,1,2,3]MoveTemp:移动构造:是左值右值做区分所构成的产物,将一个对象直接全部给另一个对象,并销毁(师傅归西,把内力全部传给徒弟),时间复杂度为O(1)。
ValArr3 = MoveTemp(ValArr4);
// ValArr3 == [5,2,3,1,2,3]
// ValArr4 == []Operator==:做比较
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边栏推荐
- Implementation of redis+caffeine two-level cache
- Maui uses Masa blazor component library
- MySQL learning notes 2022
- How MySQL enables multiple auto incrementing columns in a table
- 网络地址转换NAT
- 【Pr】基础流程
- Deadlock found when trying to get lock; Try restarting transaction
- Front and back management system of dessert beverage store based on SSM framework dessert mall cake store [source code + database]
- Unity prevents the BTN button from being clicked continuously
- D security can call the system
猜你喜欢

VR panoramic shooting breaks the deadlock of traditional propaganda that wild geese pass without leaving traces

网络地址转换NAT

【无标题】

MadCap Flare 2022,语言或格式的文档

Rongyun: let the bank go to the "cloud" easily

位置编码(PE)是如何在Transformers中发挥作用的

C language student management system (open source)

CVE-2022-22965複現

轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷

JasperReport报表生成工具的基本使用和常见问题
随机推荐
Perceptron of machine learning
Database employment consulting system for your help
Unity商业游戏常用真机调试插件
Aliyundrive fuse that allows jellyfin to directly mount alicloud disks
ThoughtWorks. QRcode and zxing Net QR code, URL can be directly jumped
一文彻底弄懂单例模式(Singleton)
Differences and performance of array, list, ArrayList, directory and LinkedList in C #
Nested assignment of D
MySQL learning notes 2022
Kukai TV ADB
Quickly understand the commonly used symmetric encryption algorithm, and no longer have to worry about the interviewer's thorough inquiry
验证码是自动化的天敌?看看大神是怎么解决的
Groovy之闭包
Getting started with go web programming: validators
CVE-2022-22965複現
拜登簽署兩項旨在加强政府網絡安全的新法案
Fluentd is easy to get started. Combined with the rainbow plug-in market, log collection is faster
Random forest of machine learning
Is polardbx PG or MySQL?
Detailed explanation of CSAPP Labs