当前位置:网站首页>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","!"]边栏推荐
- Error: Unable to find a match: lrzsz的解决方法
- [untitled]
- Vcip2021: super resolution using decoded information
- Chip silicon and streaming technology
- OpenVINO CPU加速调研
- flutter video_ Player monitors and automatically plays the next song
- 个人免签支付方案推荐
- Lisez ceci pour vous apprendre à jouer avec la cible de test de pénétration vulnhub - driftingblues - 5
- If you want to know the stock account opening discount link, how do you know? Is it safe to open an account online?
- Detailed explanation of CSAPP Labs
猜你喜欢

【Pr】基础流程

基于SSH框架甜品商城管理系统【源码+数据库】
![[Software Engineering] acquire requirements](/img/52/01320eee5e519910a62f48d604b180.png)
[Software Engineering] acquire requirements

UE4 通过蓝图获取本地文件
![[Software Engineering] planning and project management](/img/93/4b5b5034fbfb76adef1b4fe93a85cb.png)
[Software Engineering] planning and project management

After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-5

个人免签支付方案推荐

Biden signe deux nouvelles lois visant à renforcer la cybersécurité du Gouvernement

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

S7-200SMART与FANUC机器人进行Profinet通信的具体方法和步骤
随机推荐
C # define and implement interface interface
MadCap Flare 2022,语言或格式的文档
[Software Engineering] acquire requirements
【考研攻略】北京交通大学网络空间安全专业2018-2022年考研数据分析
Cosmos、Polkadot
Zhongshanshan: engineers after being blasted will take off | ONEFLOW u
C # paging calculation total pages, current page data set
Closure of groovy
Cat agile team coaching workshops - August 20
Struggle, programmer chapter 50: a bosom friend in the sea
No wonder the postgraduate entrance examination is so hot. These are the "hidden benefits" of Postgraduates!
11 方法引用和构造器应用
一篇博客让你了解Material Design的使用
【浙江大学】考研初试复试资料分享
Chengdu test equipment development_ Array introduction of C language for single chip microcomputer
Perceptron of machine learning
Vscode个性化设置:让一个小萌妹陪你敲代码
Excuse me, is Zhongyan futures reliable? Is the fund safe?
Dessert mall management system based on SSH framework [source code + database]
Unity prevents the BTN button from being clicked continuously