-
-
Save ilpropheta/9589de931aeb9f9652b7be694aa22c8c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char arr[5] {}; | |
auto value1 = 10, value2 = 20; | |
auto ptrStart = arr; auto ptrEnd = arr + 5; | |
auto res = to_chars(ptrStart, ptrEnd, value1); | |
if (!res.overflow) // fitted the buffer? | |
res = to_chars(res.ptr, ptrEnd, value2); | |
// [‘1’, ‘0’, ‘2’, ‘0’, \0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment