exception

Programming/C++ & Unreal

C++ 가변인자(va_list)를 오버로딩 하지 말자.

#include #include void Print(const char* format, va_list args) { // 2번째 Print 함수에서 호출함 vprintf(format, args); } void Print(const char* format, ...) { // main 에서 호출함 va_list args; va_start(args, format); Print(format, args); va_end(args); } int main() { char a[] = "Hello "; char b[] = "world!"; Print("%s %s", a, b); // "Hello world!" 출력됨. return 0; } 위 코드는 아무 문제가 없다. 가변인자가 잘 들어가서 2번째 Print 함수 -> ..

Programming/C++ & Unreal

C++ parallel for_each (thread) exception

#include #include #include #include #include #include LONG WINAPI UnhandleExceptionHandler(_EXCEPTION_POINTERS* exceptionInfo) { std::cout

장형이
'exception' 태그의 글 목록