로딩
요청 처리 중입니다...

콤마 넣기

 콤마 넣기

int GetNumberFormat( LCID Locale, // locale DWORD dwFlags, // options LPCTSTR lpValue, // input number string CONST NUMBERFMT *lpFormat, // formatting information LPTSTR lpNumberStr, // output buffer int cchNumber // size of output buffer); 넘버를 스트링으로 변환할때 Format이 필요할때가 있는데.. 바로..

그걸 해주는 겁니다. 즉 3자리씩 끊어서 콤마(,)를 넣어준다는 것이지요 123456789 --> 123,456,789 이런식..

CString InSertComma(double dNum){ int i, j; CString strTmp; CString strNum; strTmp.Format("%.0f", dNum); for(i = strTmp.GetLength() - 1, j = 1; i >= 0; i--, j++) { if( ((j % 3) == 1 ) &am..........

원문 링크 : 콤마 넣기