home > 比較編 > C, C++, Objective-C, Java, C# > template specialization >

ForNext

Only Do What Only You Can Do

141. multiple type parameters

VBScript

JScript

Perl

PHP

Python

Ruby

PowerShell

Scala

F#

C

C++

template <class A, class B>
class Pair {
public:
  A a;
  B b;
  Pair(A a, B b);
};

template <class A, class B>
Pair<A, B>::Pair(A a, B b) :
  a(a), b(b) { }

Pair<int, string> p =
  Pair<int, string>(7, "foo");

C++Builder

VC++

C#

Java

Objective-C

D

VB

VB.NET

Delphi

Ada

PL/SQL

T-SQL

関数型

inserted by FC2 system