当前位置:网站首页>U++ programming array learning notes
U++ programming array learning notes
2022-06-22 14:53:00 【It's a bald rabbit】
Tarray:
establish :
TArray<int32> IntArray;Assign initial value to :
IntArray.Init(10, 5);
// IntArray == [10,10,10,10,10]Add and Emplace Function to create a new element at the end of the array :
TArray<FString> StrArr;
StrArr.Add (TEXT("Hello"));
StrArr.Emplace(TEXT("World"));
// StrArr == ["Hello","World"]Append Add multiple elements from one at a time TArray, Or add a point to general C The pointer to the array and the size of the array :
FString Arr[] = { TEXT("of"), TEXT("Tomorrow") };
StrArr.Append(Arr, ARRAY_COUNT(Arr));
// StrArr == ["Hello","World","of","Tomorrow"] AddUnique Add a new element to the container only if the equivalent element does not already exist . Use element types to check for equivalence operator==:
StrArr.AddUnique(TEXT("!"));
// StrArr == ["Hello","World","of","Tomorrow","!"]
StrArr.AddUnique(TEXT("!"));
// StrArr is unchanged as "!" is already an elementInsert Insert at a location :
StrArr.Insert(TEXT("Brave"), 1);
// StrArr == ["Hello","Brave","World","of","Tomorrow","!"] The SetNum Function can directly set the number of array elements , If the new element is larger than the current element , Then use the default constructor of the element type to create a new element :
StrArr.SetNum(8);
// StrArr == ["Hello","Brave","World","of","Tomorrow","!","",""]SetNum If the new number is less than the current number , The element will also be deleted . More details about element deletion will be provided later :
StrArr.SetNum(6);
// StrArr == ["Hello","Brave","World","of","Tomorrow","!"]边栏推荐
- Messari annual report-2022
- 作为程序员,职业规划需要注意的四个阶段
- flutter video_player实现监听和自动播放下一首歌曲
- 世界上所有的知名网络平台
- 验证码是自动化的天敌?看看大神是怎么解决的
- 同花顺开户难么?网上开户安全么?
- Go all out to implement the flood control and disaster relief measures in detail and in place, and resolutely protect the safety of people's lives and property
- Fluentd is easy to get started. Combined with the rainbow plug-in market, log collection is faster
- d的破坏与安全
- 一文彻底弄懂单例模式(Singleton)
猜你喜欢

Fluentd is easy to get started. Combined with the rainbow plug-in market, log collection is faster

本周四晚19:00战码先锋第7期直播丨三方应用开发者如何为开源做贡献
![[untitled]](/img/ff/f23e5275683d4d7b13fcb94cc77702.png)
[untitled]

验证码是自动化的天敌?看看大神是怎么解决的

【浙江大学】考研初试复试资料分享

封装api时候token的处理

Open source SPL redefines OLAP server
![[introduction to postgraduate entrance examination] analysis of postgraduate entrance examination data of Cyberspace Security Major of Beijing Jiaotong University from 2018 to 2022](/img/84/b572b3b80cc0dd1489076116cf0638.png)
[introduction to postgraduate entrance examination] analysis of postgraduate entrance examination data of Cyberspace Security Major of Beijing Jiaotong University from 2018 to 2022

世界上所有的知名网络平台

C# Winform 相册功能,图片缩放,拖拽,预览图分页
随机推荐
Thoroughly understand the builder mode (builder)
Maui uses Masa blazor component library
unity防止按钮btn被连续点击
Chengdu test equipment development_ Array introduction of C language for single chip microcomputer
拜登簽署兩項旨在加强政府網絡安全的新法案
开源SPL重新定义OLAP Server
作为程序员,职业规划需要注意的四个阶段
Vscode个性化设置:让一个小萌妹陪你敲代码
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
Kukai TV ADB
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
2022orace database installation and use
个人免签支付方案推荐
Introduction to groovy syntax
U++编程 数组学习笔记
d的嵌套赋值
剑指Offer46——把数字翻译成字符串
How to compare the size of two dates in unity and C #
Messari annual report-2022
unity和C#中怎么去比较2个日期大小