0

Can i return string in function

Function

8th Jan 2020, 3:22 PM
Jashpal Singh Rajpurohit
Jashpal Singh Rajpurohit - avatar
3 ответов
+ 2
Sure you can! #include <iostream> #include <string> using namespace std; string f(string s) { return s+" World"; } int main() { cout << f("Hello"); return 0; }
8th Jan 2020, 4:26 PM
HonFu
HonFu - avatar