Run ❯
Get your
own
website
❯
Run Code
Ctrl+Alt+R
Change Orientation
Ctrl+Alt+O
Change Theme
Ctrl+Alt+D
Go to Spaces
Ctrl+Alt+P
#include
using namespace std; template
class Pair { public: T1 first; T2 second; Pair(T1 a, T2 b) { first = a; second = b; } void display() { cout << "First: " << first << ", Second: " << second << "\n"; } }; int main() { Pair
person("John", 30); Pair
score(51, 9.5); person.display(); score.display(); return 0; }
First: John, Second: 30
First: 51, Second: 9.5