- 4,663
- 36
What does the "1" do in string() in this line?
answer = string(1,'0'+i%10) + answer;
Thanks!
answer = string(1,'0'+i%10) + answer;
Thanks!
The discussion revolves around the usage of the `string()` function in C++, specifically focusing on the meaning of its arguments in a given line of code. Participants explore the function's behavior and its application in a programming context.
Participants do not appear to disagree on the function's behavior, but there is initial confusion regarding its usage and context. The discussion reflects a progression from uncertainty to understanding without explicit consensus on all details.
Some participants express confusion about the function's application in a specific exercise, indicating potential limitations in their understanding or the clarity of the original problem.