i'm testing out a template function i created for a header file i'm writing, but it will not compile for some reason. it's giving me problems with iosfwd, although i'm not using it.
#include <iostream>
using namespace std;
template <class LOGICAL_AND>
LOGICAL_AND __and(x, y)
{
return x==y ? 1 | 0;
}
int main()
{
int a = 24;
int b = 7;
int c = 12;
int d = 12;
char x[2]; //use to close program and show values
cout << __and(a,b) << endl;
cout << __and(c,d) << endl;
cin.get(x,2);
return 0;
}
i would post up the errors but theres around 147 of them e.e
any ideas?