#include <iostream>
template <class T, class U, class V = char>
class Example {
private:
T a;
U b;
V c;
public:
Example(T val1, U val2, V val3) : a(val1), b(val2), c(val3) {} // constructor
void print() {
std::cout << "a = " << a << std::endl;
std::cout << "b = " << b << std::endl;
std::cout << "c = " << c << std::endl;
}
};
int main() {
Example<int, double> obj1(98, 3.14, 'w');
obj1.print();
Example<double, char, bool> obj2(5.891, 'p', true);
obj2.print();
}
/*
run:
10 25
*/