Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Merge requests
!19
An error occurred while fetching the assigned milestone of the selected merge_request.
Nina
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Nina
nina
into
develop
Overview
0
Commits
22
Pipelines
0
Changes
15
Merged
Tomáš Oberhuber
requested to merge
nina
into
develop
6 years ago
Overview
0
Commits
22
Pipelines
0
Changes
15
Expand
0
0
Merge request reports
Compare
develop
develop (base)
and
latest version
latest version
59cdf101
22 commits,
6 years ago
15 files
+
1002
−
156
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
15
Search (e.g. *.vue) (Ctrl+P)
src/Examples/ArrayExample.cpp
0 → 100644
+
27
−
0
Options
#include
<iostream>
#include
<TNL/Containers/Array.h>
using
namespace
TNL
;
using
namespace
std
;
int
main
()
{
Containers
::
Array
<
int
>
array1
;
array1
.
setSize
(
5
);
array1
.
setValue
(
0
);
cout
<<
"Does array contain 1?"
<<
array1
.
containsValue
(
1
)
<<
endl
;
cout
<<
"Does array contain only zeros?"
<<
array1
.
containsOnlyValue
(
0
)
<<
endl
;
Containers
::
Array
<
int
>
array2
(
3
);
array2
.
setValue
(
1
);
array2
.
swap
(
array1
);
array2
.
setElement
(
2
,
4
);
cout
<<
"First array:"
<<
array1
.
getData
()
<<
endl
;
cout
<<
"Second array:"
<<
array2
.
getData
()
<<
endl
;
array2
.
reset
();
cout
<<
"Second array after reset:"
<<
array2
.
getData
()
<<
endl
;
// bind
}
Loading