Edit & run on cpp.sh Mar 8, 2022 at 11:21am seaminusminus(11) Thanks again @ thmm --- here's the updated program: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 #include <iostream>usingnamespacestd;intmain() { string inputText;inti; getline(cin, in...
We can see that the argument is in the s buffer, which is the first buffer we fill. As that pointer looks for a string there, it will take the first characters of the buffer until it finds a zero, so we can put the data that we want to fill that buffer with at the beginning. ...
string s1 ="Hello"; string s2 ="world!"; cout << s1 +' '+ s2 << endl; void is a "type" in the sense that it doesn't return anything. It's quite useful, especially for functions where you want to do something to something else, but (obviously) have no need or desire for a...