code.club's Archiver
論壇
›
C/C++
› C++函數才能返回一個字串
enter
發表於 2015-9-15 22:40:33
C++函數才能返回一個字串
使用 string型別。
例如:
#include <iostream>
using namespace std;
string test(string a){
return a;
}
int main(){
cout<<test("hello world");
return 0;
}
頁:
[1]
查看完整版本:
C++函數才能返回一個字串