System::Tuple 클래스
내용물
[
숨다
]Tuple class
튜플 데이터 구조를 나타내는 클래스입니다. 최대 항목 수는 8개입니다.
template<typename ...>class Tuple : public System::Runtime::CompilerServices::ITuple
| 매개변수 | 설명 |
|---|---|
| 인수 | 튜플 요소 유형들. |
메서드
| 메서드 | 설명 |
|---|---|
| Equals(SharedPtr<Object>) override | 현재 객체와 지정된 객체가 동일한지 확인합니다. |
| get_Item() const | Tuple 객체의 구성 요소 값을 가져옵니다. |
| Tuple(Args…) | 튜플 객체를 생성합니다. |
비고
#include "system/smart_ptr.h"
#include "system/tuple.h"
#include <iostream>
int main()
{
const auto tuple = System::MakeObject<System::Tuple<int, int, int>>(32, 16, 128);
std::cout <<
"Item 1: " << tuple->get_Item<0>() << std::endl <<
"Item 2: " << tuple->get_Item<1>() << std::endl <<
"Item 3: " << tuple->get_Item<2>() << std::endl;
return 0;
}
/*
This code example produces the following output:
Item 1: 32
Item 2: 16
Item 3: 128
*/
또 보기
- Class ITuple
- Namespace System
- Library Aspose.Page for C++