Make a function that takes 2 integers as parameters, and returns an integer.
You can print the result in hexadecimal form with the std::hex mode:
num = ANDoperation(0x0011, 0x0101);
std::cout << "0x" << std::hex << num;
Last edited by John A; Apr 12th, 2009 at 1:09 am. Reason: changed my solution to C++ :o
Reputation Points: 2240
Solved Threads: 338
Vampirical Lurker
Offline 5,055 posts
since Apr 2006