참고 소스 썸네일형 리스트형 [MFC] 실행파일 디렉토리 CString getLaunchDir() { char szDir[128]; char szDrive[256]; _splitpath(AfxGetApp()->m_pszHelpFilePath, szDrive, szDir, NULL, NULL); CString strLaunched; strLaunched.Format(_T("%s%s"), szDrive, szDir); return strLaunched; } 더보기 반올림, 올림, 내림 // 소수점 3번째 자리에서..double a,b,c,ac,af,ar; a=123.456789; b=123.499999; c=123.500001; ac=(ceil(a*100))/100; af=(floor(a*100))/100; ar=(floor((a*100)+0.5))/100; 더보기 각도를 0에서 360사이로 변경하는 방법 #include #include using namespace std; int main(){ const int maxLoop = 1000000000; { float fAngle = 90.f; const time_t startTime = time(0); for( int i = 0; i < maxLoop; ++i ) { volatile float clamppedAngle = fmod( fAngle, 360.f ); } const time_t endTime = time(0); cout 더보기 이전 1 다음