/*
 *  template.cpp
 *  
 *
 *  Created by GLevi on 19/11/09.
 *  Copyright 2009 __MyCompanyName__. All rights reserved.
 *
 */


#include <iostream>
using namespace std;

template <class B,class T >
B  Add(T a, T b) //C++ function template sample
{
	//cout << a+b<< " " << (B) a+b  << endl;
	return  a+b ;
}

int main()
{
	float a,b,c;
	
	a=0.3;
	b=1.8;
	c=Add<float>(a,b);
	cout << Add<float,int>(a,b)<< " " << Add<int,float>(a,b) <<" " << " c= " << c << endl;
	//cout << Add(a,b) << endl;
}