Home Forums US Life c++ pow 함수 컴패리슨 오퍼레이타와 쓸때…이거 모르겠네… This topic has [9] replies, 0 voices, and was last updated 3 years ago by 3t. Now Editing “c++ pow 함수 컴패리슨 오퍼레이타와 쓸때…이거 모르겠네…” Name * Password * Email Topic Title (Maximum Length 80) 경우 1. if (counter & (int) pow(2,j)) // works OK 경우 2. if (counter == (int) pow(2,j)) // Error! why? 카운터는 인티저 타입이고, 위의 둘사이에 뭐가 다른걸까요? 경우1은 문제없이 잘 결과가 나오는데, 경우2는 컴파일 에러는 안나지만 예상했던 결과는 안나오는데.... 차이가 뭘까요? j 가 큰것도 아니고 1에서 시작해서 4나 5정도까지 일때요. I agree to the terms of service Update List