@RamilH/Template Test
C++11

No description

fork
loading
repl talk
(games)
Files
  • main.cpp
  • Pair.hpp
  • Pair.inl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
#include <string>
#include "Pair.hpp"

int main()
{
	Pair<int> ipair(3, 8);
	Pair<double> dpair(3.0, 8.0);
	Pair<std::string> spair("Hello", "World");

	ipair.print();
	ipair.swap();
	ipair.print();

	std::cout << "\n\n";

	dpair.print();
	dpair.swap();
	dpair.print();
	
	std::cout << "\n\n";
	
	spair.print();
	spair.swap();
	spair.print();

	return 0;
}
gcc version 4.6.3