View Single Post
Old 10-31-2006, 10:40 AM   #7 (permalink)
toe_cutter
Code Monkey
 
Join Date: Aug 2002
Location: Boston, MA
Posts: 79
toe_cutter is on a distinguished road
Send a message via ICQ to toe_cutter Send a message via AIM to toe_cutter Send a message via Yahoo to toe_cutter
Quote:
Originally Posted by redhead View Post
Or change printBin() to:
Code:
void printBin( int var ) {
  int i;
  for (i=11; i>=0; i--)
    cout << ((var >> i) & 1);
  cout << endl;
}
Good call. I've been programming in C for so long now I have forgotten a bunch of c++ stuff.
__________________
toe_cutter is offline   Reply With Quote