More Related Content
Similar to [Gpg2권 조진현] 1.2 인라인 함수 대 매크로
Similar to [Gpg2권 조진현] 1.2 인라인 함수 대 매크로 (20)
[Gpg2권 조진현] 1.2 인라인 함수 대 매크로
- 4. 오버헤드!!! 일반적인 함수 Func() prefix Main() … prefix suffix Func() suffix Main() Func() pascal방식 cdecl방식
- 10. #define max(a,b) ((a)>(b) ? (a):(b)) max( ++x, y ) x == 5, y == 3 왜 결과가 7인가요?
- 19. 생활 속의 매크로 기법들 #define USES_CONVERSION int_convert = 0; (_convert); UINT _acp = ATL::_AtlGetConversionACP() /*CP_THREAD_ACP*/; (_acp); LPCWSTR _lpw = NULL; (_lpw); LPCSTR _lpa = NULL; (_lpa) void MyTest(){ USES_CONVERSION; std::string s1("abc"); std::wstring s2(A2W(s1.c_str())); s1 = W2A(s2.c_str());}