当前位置:网站首页>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","!"]边栏推荐
- Sikulix select the picture of relative position (advanced version)
- C语言学生管理系统(开源)
- Kukai TV ADB
- 轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
- U++编程 数组学习笔记
- 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
- Flutter video Le lecteur écoute et joue automatiquement la prochaine chanson
- Struggle, programmer -- Chapter 44: eight hundred miles under one's command, fifty strings turning over the Great Wall
- Front and back management system of dessert beverage store based on SSM framework dessert mall cake store [source code + database]
猜你喜欢

S7-200SMART与FANUC机器人进行Profinet通信的具体方法和步骤

Software architecture

RealNetworks vs. 微软:早期流媒体行业之争

加密市场进入寒冬,是“天灾”还是“人祸”?

看完这篇 教你玩转渗透测试靶机Vulnhub——DriftingBlues-5

基于SSM框架实现的甜品饮品店前后台管理系统甜品商城蛋糕店【源码+数据库】

网络地址转换NAT

开源SPL重新定义OLAP Server

Network address translation nat

Zhongshanshan: engineers after being blasted will take off | ONEFLOW u
随机推荐
【毕业设计】基于半监督学习和集成学习的情感分析研究
Unity's rich text color sets the color to be fully transparent
Basic usage and FAQs of jasperreport report report generation tool
Biden signe deux nouvelles lois visant à renforcer la cybersécurité du Gouvernement
基于SSM框架实现的甜品饮品店前后台管理系统甜品商城蛋糕店【源码+数据库】
unity的富文本Text的Color设置颜色全透明
作为过来人,写给初入职场的程序员的一些忠告
难怪考研热度这么高,这些是研究生才有的“隐藏福利”!
If you want to know the stock account opening discount link, how do you know? Is it safe to open an account online?
C#泛型_泛型类
轻松上手Fluentd,结合 Rainbond 插件市场,日志收集更快捷
Sikulix选取相对位置的图片(进阶版)
Unity 子线程调用主线程的UI
网站存在的价值是什么?为什么要搭建独立站
How to compare the size of two dates in unity and C #
同花顺如何开户?在线开户安全么?
作为程序员,职业规划需要注意的四个阶段
NF-ResNet:去掉BN归一化,值得细读的网络信号分析 | ICLR 2021
剑指Offer46——把数字翻译成字符串
Perceptron of machine learning