2013년 3월 29일 금요일
2013년 3월 24일 일요일
[win32api] data type
TCHAR resolves to either a "char" or a "wchar_t" depending on if UNICODE is defined or not (in VS project properties, "Use Unicode Character Set" will enable UNICODE).
LPCTSTR - the "T" in the middle stands for TCHAR, so this is a "const TCHAR*" - which in turn is either "const char*" or "const wchar_t*".
LPSTR = char*
LPCSTR = const char*
LPWSTR = wchar_t*
LPCWSTR = const wchar_t*
LPTSTR = LPSTR or LPWSTR
LPCTSTR = LPCSTR or LPCWSTR
LPCTSTR - the "T" in the middle stands for TCHAR, so this is a "const TCHAR*" - which in turn is either "const char*" or "const wchar_t*".
LPSTR = char*
LPCSTR = const char*
LPWSTR = wchar_t*
LPCWSTR = const wchar_t*
LPTSTR = LPSTR or LPWSTR
LPCTSTR = LPCSTR or LPCWSTR
2013년 3월 23일 토요일
[면접]회사가 부당한 지시를 하면 어떻게 할 건가
면접관이 자주 물어보는 질문이다. 물론 안 물어보는 회사도 많지만 많은 회사가 이런 질문을 한다. 이 때 부당한 지시니까 따르지 않겠다고 하면 면접에서 떨어진다. 회사 입장에서는 직원이 혹시 회사의 기밀이나 비리를 누설하거나 고발을 할까봐 우려하기 때문에 비록 부당한 지시를 따르는 것이 옳지 않다고 생각하더라도 일단 면접에서 합격하려면 회사의 방침에 따르겠다고 말하는 것이 옳다. 그리고 면접에서 합격하고 나서 실제로 회사가 그런 지시를 한다면 그 때 정말 부당하다고 생각되면 안 따르면 그만이다.
면접은 윤리시험이 아니라 회사에 필요한 직원을 뽑는 시험이기 때문에 자기 입장에서 생각하지 말고 회사 입장에서 생각해야 한다.
면접은 윤리시험이 아니라 회사에 필요한 직원을 뽑는 시험이기 때문에 자기 입장에서 생각하지 말고 회사 입장에서 생각해야 한다.
2013년 3월 18일 월요일
#pragma
14.6. The #pragma Directive
The #pragma directive is a standard way to provide additional information to the compiler. This directive has the following form:
#pragma [tokens]
If the first token after #pragma is STDC, then the directive is a standard pragma. If not, then the effect of the #pragma directive is implementation-dependent. For the sake of portability, you should use #pragma directives sparingly.
If the preprocessor recognizes the specified tokens, it performs whatever action they stand for, or passes information on to the compiler. If the preprocessor doesn't recognize the tokens, it must ignore the #pragma directive.
Recent versions of the GNU C compiler and Microsoft's Visual C compiler both recognize the pragma pack(n), for example, which instructs the compiler to align structure members on certain byte boundaries. The following example uses pack(1) to specify that each structure member be aligned on a byte boundary:
#if defined( _ _GNUC_ _ ) || defined( _MSC_VER )
#pragma pack(1) // Byte-aligned: no padding.
#endif
Single-byte alignment ensures that there are no gaps between the members of a structure. The argument n in a pack pragma is usually a small power of two. For example, pack(2) aligns structure members on even-numbered byte addresses, and pack(4) on four-byte boundaries. pack( ) with no arguments resets the alignment to the implementation's default value.
C99 introduced the following three standard pragmas:
#pragma STDC FP_CONTRACT on_off_switch
#pragma STDC FENV_ACCESS on_off_switch
#pragma STDC CX_LIMITED_RANGE on_off_switch
The value of the on_off_switch must be ON, OFF, or DEFAULT. The effects of these pragmas are discussed in "Mathematical Functions" in Chapter 16.
[win32api] icon
change NULL into hInstance
char szAppName[] ="해구장"; WndClass.style = NULL; WndClass.lpfnWndProc = WndProc; WndClass.cbClsExtra = 0; WndClass.cbWndExtra = 0; WndClass.hInstance = hInstance; WndClass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON2)); WndClass.hCursor = LoadCursor(NULL, IDC_ARROW); WndClass.hbrBackground = (HBRUSH) GetStockObject(WHITE_BRUSH); WndClass.lpszMenuName = NULL; WndClass.lpszClassName = szAppName;
피드 구독하기:
글 (Atom)

