C++(2)
-
fabs, abs, sprintf, format
1. fabs, abs C에서의 fabs와 자바의 abs는 결론적으로 같다는 것이다 http://www.sist.ac.jp/~suganuma/cpp/man/function/fabs.htm 菅沼研究室 informatics.sist.ac.jp:443 2. sprintf, format C는 sprintf함수를 제공하고, C++은 CString의 Format 함수를 제공 합니다. 그리고 우리의 자바는 String 클래스에서 fomat 메서드를 제공 하겠죠?? ㅋㅋ C++에서는 다음과 같이 함수를 사용 할 수 있습니다.(정확히는 MFC 라고 할까요...ㅡ.ㅡ) CString m_sOutLongitude; m_sOutLongitude.Format("%.10f", 123.456798); 자바에서는 다음과 같이 메서드..
2022.12.27 -
C++ Move 문법을 이용한 외부 할당 메모리 포인터 관리
Using C++ Move Semantics to Manage Pointers to Externally Allocated Memory The win32 subsystem often returns pointers to objects that need to be deallocated by the caller. In this article, I show a way to do this reliably and in an exception-safe manner. www.codeproject.com win32 하위 시스템은 호출자가 할당을 해제해야 하는 객체들에 대한 포인터를 반환하는 경우가 많습니다. 이 글에서 이를 안정적이고 예외로부터 안전한 방식으로 수행하는 방법을 보여 드리겠습니다. 소개 저는 최근에 보안 관..
2022.11.14