NIUCLOUD是一款SaaS管理后台框架多应用插件+云编译。上千名开发者、服务商正在积极拥抱开发者生态。欢迎开发者们免费入驻。一起助力发展! 广告
###################C语言风格##################### #include <iostream> using namespace std; int main(){ char greeting[11] = {'h','e','l','l','o','\0'}; cout << greeting; } ##################string类################# #include <iostream> //#include <string> using namespace std; int main(){ int len; string str3; string str1 = "hello"; string str2 = "world"; str3 = str1+str2; cout << str3 << endl; len = str3.size(); cout << len; }