Поделиться через


CStringT::AppendFormat

Appends formatted data to an existing CStringT object.

void __cdecl AppendFormat(
   PCXSTR pszFormat,
   [, argument]...
);
void __cdecl AppendFormat(
   UINT nFormatID,
   [, argument]...
);

Параметры

  • pszFormat
    A format-control string.

  • nFormatID
    The string resource identifier that contains the format-control string.

  • argument
    Optional arguments.

Заметки

This function formats and appends a series of characters and values in the CStringT. Each optional argument (if any) is converted and appended according to the corresponding format specification in pszFormat or from the string resource identified by nFormatID.

Пример

// typedef CStringT<TCHAR, StrTraitATL<TCHAR, ChTraitsCRT<TCHAR>>> CAtlString;

CAtlString str = _T("Some data:\t");

str.AppendFormat(_T("X value = %.2f\n"), 12345.12345);
_tprintf_s(_T("%s"), (LPCTSTR) str);

Требования

Header: cstringt.h

См. также

Основные понятия

CStringT Class

CStringT Members