aboutsummaryrefslogtreecommitdiff
path: root/main1.cpp
blob: 85347457d8ad34ea4bb45f91d7e85f7942e05ac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
#include <vector>
#include <string>

template <class T>
T h (T i){
	return i;
}

int main(){
	std::string v;
	bool keep = true;
	std::cout << "Welcome to template experiment\n";
	std::cout << "Stop the program by writting quit anywhere in the text\n";
	while (keep){
		std::cout << "Write something :";
		std::cin >> v;
		std::cout << "You wrote: " << h(v) << "\n";
		if (v=="quit")
			keep = false;
	}
	return 0;
}