아래 코드 해설좀 해주세요. KLDP에서 언젠가 본거 같은데 찾을수가 없네요 ㅡㅡ; 자세히 설명해주시면 감사하겠습니다.
int offset = (int)(T *)1 - (int)(Singleton <T>*)(T *)1; m_pSingleton = (T *)((int)this + offset);
이식성도 없고 정의되지 않은 결과를 유발하는 코드임을 주의하세요.
http://www.gpgstudy.com/forum/viewtopic.php?t=1159&highlight=%28int%29%28T
텍스트 포맷에 대한 자세한 정보
<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.gpgstudy.com/forum/viewtopic.php?t=1159&highlight=%28int%29%28T
댓글 달기