You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> The third argument to `strcpy_s` (or the Unicode/MBCS-portable `_tcscpy_s`) is either a `const wchar_t*` (Unicode) or a `const char*` (ANSI). The example above passes a `CString` for this argument. The C++ compiler automatically applies the conversion function defined for the `CString` class that converts a `CString` to an `LPCTSTR`. The ability to define casting operations from one type to another is one of the most useful features of C++.
49
+
> The third argument to `strcpy_s` (or the Unicode/MBCS-portable `_tcscpy_s`) is either a `const wchar_t*` (Unicode) or a `const char*` (ANSI). The example above passes a `CString` for this argument. The C++ compiler automatically applies the conversion function defined for the `CString` class that converts a `CString` to an `LPCTSTR`. The ability to define casting operations from one type to another is one of the most useful features of C++.
50
50
51
51
## <aname="_core_working_with_standard_run.2d.time_library_string_functions"></a> Working with Standard Run-Time Library String Functions
52
52
@@ -62,13 +62,13 @@ There are some situations where it makes sense to directly modify the `CString`
62
62
63
63
The `GetBuffer` and `ReleaseBuffer` methods offer access to the internal character buffer of a `CString` object and let you modify it directly. The following steps show how to use these functions for this purpose.
64
64
65
-
####To use GetBuffer and ReleaseBuffer to access the internal character buffer of a CString object
65
+
### To use GetBuffer and ReleaseBuffer to access the internal character buffer of a CString object
66
66
67
67
1. Call `GetBuffer` for a `CString` object and specify the length of the buffer you require.
68
68
69
-
2. Use the pointer returned by `GetBuffer` to write characters directly into the `CString` object.
69
+
1. Use the pointer returned by `GetBuffer` to write characters directly into the `CString` object.
70
70
71
-
3. Call `ReleaseBuffer` for the `CString` object to update all the internal `CString` state information, for example, the length of the string. After you modify the contents of a `CString` object directly, you must call `ReleaseBuffer` before you call any other `CString` member functions.
71
+
1. Call `ReleaseBuffer` for the `CString` object to update all the internal `CString` state information, for example, the length of the string. After you modify the contents of a `CString` object directly, you must call `ReleaseBuffer` before you call any other `CString` member functions.
72
72
73
73
## <aname="_core_using_cstring_objects_with_variable_argument_functions"></a> Using CString Objects with Variable Argument Functions
74
74
@@ -92,4 +92,3 @@ For most function results, you can simply return a `CString` object by value.
Copy file name to clipboardExpand all lines: docs/atl-mfc-shared/current-time-general-purpose-classes.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ ms.workload: ["cplusplus"]
15
15
16
16
The following procedure shows how to create a `CTime` object and initialize it with the current time.
17
17
18
-
####To get the current time
18
+
### To get the current time
19
19
20
20
1. Allocate a `CTime` object, as follows:
21
21
@@ -24,7 +24,7 @@ The following procedure shows how to create a `CTime` object and initialize it w
24
24
> [!NOTE]
25
25
> Uninitialized `CTime` objects are not initialized to a valid time.
26
26
27
-
2. Call the `CTime::GetCurrentTime` function to get the current time from the operating system. This function returns a `CTime` object that can be used to set the value of `CTime`, as follows:
27
+
1. Call the `CTime::GetCurrentTime` function to get the current time from the operating system. This function returns a `CTime` object that can be used to set the value of `CTime`, as follows:
0 commit comments