In the given program, value of x does not change as per input given by user. It assigns x= 2 automatically and prints the same. What is the reason ?
Code:#include <iostream> using namespace std; template <class vt> void combio(char *message,vt x) { cout << message; cin >> x; } int main() { int x; combio<int>("please enter a value",x); cout << x; system("PAUSE"); return 0; }