#include <iostream>
#include <atlsimpstr.h>
#include <atlstr.h>
int main()
{
std::cout << "Hello, world!\n";
CString str("dummy");
_tprintf_s(_T("String length: %d\n"), str.GetLength());
_tprintf_s(_T("Allocated length: %d\n"), str.GetAllocLength());
str.Preallocate(100);
_tprintf_s(_T("Allocated length: %d\n"), str.GetAllocLength());
}
|