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
@@ -259,6 +269,9 @@ Construct a new `CSimpleStringT` object. Because the constructors copy the input
259
269
The following example demonstrates the use of `CSimpleStringT::CSimpleStringT` by using the ATL **`typedef`**`CSimpleString`. `CSimpleString` is a commonly used specialization of the class template `CSimpleStringT`.
260
270
261
271
```cpp
272
+
CAtlString basestr;
273
+
IAtlStringMgr* pMgr = basestr.GetManager();
274
+
262
275
CSimpleString s1(pMgr);
263
276
// Empty string
264
277
CSimpleString s2(_T("cat"), pMgr);
@@ -292,6 +305,9 @@ For more information, see [Strings: `CString` Exception Cleanup](../cstring-exce
292
305
The following example demonstrates the use of `CSimpleStringT::Empty`.
293
306
294
307
```cpp
308
+
CAtlString basestr;
309
+
IAtlStringMgr* pMgr = basestr.GetManager();
310
+
295
311
CSimpleString s(pMgr);
296
312
ASSERT(s.IsEmpty());
297
313
```
@@ -351,7 +367,7 @@ Retrieves the allocated length of a `CSimpleStringT` object.
351
367
352
368
### Syntax
353
369
354
-
```
370
+
```cpp
355
371
intGetAllocLength() const throw();
356
372
```
357
373
@@ -369,7 +385,7 @@ Returns one character from a `CSimpleStringT` object.
369
385
370
386
### Syntax
371
387
372
-
```
388
+
```cpp
373
389
XCHAR GetAt(int iChar) const;
374
390
```
375
391
@@ -401,7 +417,7 @@ Returns a pointer to the internal character buffer for the `CSimpleStringT` obje
401
417
402
418
### Syntax
403
419
404
-
```
420
+
```cpp
405
421
PXSTR GetBuffer(int nMinBufferLength);
406
422
PXSTR GetBuffer();
407
423
```
@@ -450,7 +466,7 @@ Returns a pointer to the internal character buffer for the `CSimpleStringT` obje
450
466
451
467
### Syntax
452
468
453
-
```
469
+
```cpp
454
470
PXSTR GetBufferSetLength(int nLength);
455
471
```
456
472
@@ -507,7 +523,7 @@ Returns the number of characters in the `CSimpleStringT` object.
507
523
508
524
### Syntax
509
525
510
-
```
526
+
```cpp
511
527
intGetLength() const throw();
512
528
```
513
529
@@ -527,7 +543,7 @@ Retrieves the memory manager of the `CSimpleStringT` object.
527
543
528
544
### Syntax
529
545
530
-
```
546
+
```cpp
531
547
IAtlStringMgr* GetManager() const throw();
532
548
```
533
549
@@ -545,7 +561,7 @@ Retrieves the character string.
545
561
546
562
### Syntax
547
563
548
-
```
564
+
```cpp
549
565
PCXSTR GetString() const throw();
550
566
```
551
567
@@ -565,18 +581,26 @@ Call this method to retrieve the character string associated with the `CSimpleSt
565
581
The following example demonstrates the use of `CSimpleStringT::GetString`.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/reference/rand.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ int rand(void);
27
27
28
28
The **`rand`** function returns a pseudorandom integer in the range 0 to **`RAND_MAX`** (32767). Use the [`srand`](srand.md) function to seed the pseudorandom-number generator before calling **`rand`**.
29
29
30
-
The **`rand`** function generates a well-known sequence and isn't appropriate for use as a cryptographic function. For more cryptographically secure random number generation, use [`rand_s`](rand-s.md) or the functions declared in the C++ Standard Library in [`<random>`](../../standard-library/random.md). For information about what's wrong with **`rand`** and how `<random>` addresses these shortcomings, see this video entitled [rand Considered Harmful](https://channel9.msdn.com/Events/GoingNative/2013/rand-Considered-Harmful).
30
+
The **`rand`** function generates a well-known sequence and isn't appropriate for use as a cryptographic function. For more cryptographically secure random number generation, use [`rand_s`](rand-s.md) or the functions declared in the C++ Standard Library in [`<random>`](../../standard-library/random.md).
31
31
32
32
By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md).
0 commit comments