hi can anyone help me??
is this code i dont know if is right or not, i am new in c++
[Error] 'Typename' has not been declred
[Error] expected initializer before 'xor' token
[Error] expected primary-expression before 'xor' token
is this code i dont know if is right or not, i am new in c++
Code:
#include <iostream> using namespace std; template < Typename T> bool T xor(const T& a, const T& b) { return !(a&&b)&&(a||b); } int main() { char a, b; cout<<" enter "; cin>>a, b; cout<<xor(a,b); return 0; }
[Error] expected initializer before 'xor' token
[Error] expected primary-expression before 'xor' token
Comment