热门

最新

红包

立Flag

投票

同城

我的

发布
laoj666
laoj666
3 年前
truelaoj666

重新学习编程的第四天
#include<iostream>
#include<string>
using namespace std;
namespace China {
float population = 14.1;
std::string capital = "北京";
}
namespace Japan {
float population = 1.27;
std::string capital = "东京";
}
int main(void)
{
cout << "中国" << endl;
cout << "首都:" << China::capital << endl;
cout << "人口:" << China::population << endl;

cout << "日本" << endl;
cout << "首都:" << Japan::capital << endl;
cout << "人口:" << Japan::population << endl;

system("pause");
return 0;
}
学习命名空间
挺有趣的哈哈

CSDN App 扫码分享
分享
评论
点赞
打赏
  • 复制链接
  • 举报
下一条:
解决了amcl定位范围的问题
立即登录