Skip to content

Commit bca423f

Browse files
author
Colin Robertson
authored
Merge pull request #657 from drvoss/patch-20
Update how-to-convert-between-various-string-types.md
2 parents c4f3f72 + ca01332 commit bca423f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/text/how-to-convert-between-various-string-types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ int main()
189189
cout << printstr << endl;
190190
// The following line of code is an easier way to
191191
// display wide character strings:
192-
// wcout << (LPCTSTR) ccombstr << endl;
192+
wcout << (LPCTSTR) ccombstr << endl;
193193
}
194194

195195
// Convert a wide wchar_t string to a multibyte CStringA,
@@ -516,7 +516,7 @@ int main()
516516
bstrt += _T(" (_bstr_t)");
517517
wcout << bstrt << endl;
518518

519-
// Convert to a wide character_bstr_t string from
519+
// Convert to a wide character _bstr_t string from
520520
// a wide character CStringW string.
521521
bstr_t bstrtw(origw);
522522
bstrtw += " (_bstr_t)";
@@ -536,8 +536,8 @@ int main()
536536
// Convert to a wide character CComBSTR string from
537537
// a wide character CStringW string.
538538
CComBSTR ccombstrw(origw);
539+
539540
// Append the type of string to it, and display the result.
540-
541541
if (ccombstrw.Append(_T(" (CComBSTR)")) == S_OK)
542542
{
543543
CW2A printstrw(ccombstrw);
@@ -619,7 +619,7 @@ int main()
619619
string orig("Hello, World!");
620620
cout << orig << " (basic_string)" << endl;
621621

622-
// Convert a wide char basic_string string to a multibyte char*
622+
// Convert a wide character basic_string string to a multibyte char*
623623
// string. To be safe, we allocate two bytes for each character
624624
// in the original string, including the terminating null.
625625
const size_t newsize = (strlen(orig.c_str()) + 1)*2;

0 commit comments

Comments
 (0)