P
Protoman
I'm trying to print some values and I get "invalid operand" errors when
I compile; here's my code:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i=0xA;
int j=0xB;
int k=i<<j;
int l=i>>j;
int m=j<<i;
int n=j>>i;
cout << "10&11 : " << i&j << endl;
cout << "10|11 : " << i|j << endl;
cout << "10^11 : " << i^j << endl;
cout << "10<<11: " << k << endl;
cout << "10>>11: " << l << endl;
cout << "11<<10: " << m << endl;
cout << "11>>10: " << n << endl;
cout << "~10 : " << ~i << endl;
cout << "~11 : " << ~j << endl;
system("PAUSE");
return 0;
}
Any suggestions? I have no idea what's wrong. Thanks!!!!
I compile; here's my code:
#include <iostream>
#include <cstdlib>
using namespace std;
int main()
{
int i=0xA;
int j=0xB;
int k=i<<j;
int l=i>>j;
int m=j<<i;
int n=j>>i;
cout << "10&11 : " << i&j << endl;
cout << "10|11 : " << i|j << endl;
cout << "10^11 : " << i^j << endl;
cout << "10<<11: " << k << endl;
cout << "10>>11: " << l << endl;
cout << "11<<10: " << m << endl;
cout << "11>>10: " << n << endl;
cout << "~10 : " << ~i << endl;
cout << "~11 : " << ~j << endl;
system("PAUSE");
return 0;
}
Any suggestions? I have no idea what's wrong. Thanks!!!!