안녕하세요 ^^ 소스를 좀 분석하다가;;첨 보는 연산자가 있어서 -_-;;
temp는 unsigned char형 num은 int형 일때;
temp=(char)(num>>3*count)); temp &=0x0f; temp +=0x30;
이런 부분이 있네요; >> 하구 &= 이게 머하는 연산자죠? -0-; 부탁드립니다..^^
비트 연산자입니다. 자세한건 다음 페이지를 참고하세요.http://www.winapi.co.kr/clec/cpp1/5-2-3.htm
I cannot use korean in this computer so, I gonna tell in english.. I'm sorry.
"num >> 3" it means "Right shift num 3"
"temp &= 0x0f" it means "temp = temp & 0x0f" so masking temp to 0x0f and put it in the temp again...
got it?
답변 감사드립니다..^^ 쉬운거였네요.. 왜 생각을 못하구 첨 보는 연산자인듯 생각했는지..ㅋ 감사합니다..ㅋ
텍스트 포맷에 대한 자세한 정보
<code>
<blockcode>
<apache>
<applescript>
<autoconf>
<awk>
<bash>
<c>
<cpp>
<css>
<diff>
<drupal5>
<drupal6>
<gdb>
<html>
<html5>
<java>
<javascript>
<ldif>
<lua>
<make>
<mysql>
<perl>
<perl6>
<php>
<pgsql>
<proftpd>
<python>
<reg>
<spec>
<ruby>
<foo>
[foo]
비트 연산자입니다.
비트 연산자입니다. 자세한건 다음 페이지를 참고하세요.
http://www.winapi.co.kr/clec/cpp1/5-2-3.htm
That is...
I cannot use korean in this computer so, I gonna tell in english.. I'm sorry.
"num >> 3" it means "Right shift num 3"
"temp &= 0x0f" it means "temp = temp & 0x0f" so masking temp to 0x0f and put it in the temp again...
got it?
답변들...감사합니다..^^
답변 감사드립니다..^^
쉬운거였네요.. 왜 생각을 못하구 첨 보는 연산자인듯 생각했는지..ㅋ
감사합니다..ㅋ
댓글 달기