Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Allocates a specific amount of bytes for the CSimpleStringT object.
void Preallocate(
int nLength
);
Parameters
- nLength
The exact size of the CSimpleStringT character buffer in characters.
Remarks
Call this method to allocate a specific buffer size for the CSimpleStringT object.
Example
The following example demonstrates the use of CSimpleStringT::Preallocate.
CSimpleString str(pMgr);
_tprintf_s(_T("Allocated length: %d\n"), str.GetAllocLength());
str.Preallocate(100);
_tprintf_s(_T("Allocated length: %d\n"), str.GetAllocLength());
Requirements
Header: atlsimpstr.h