Aggregate Class(聚合类)的使用
2015-09-28 00:33
316 查看
struct Data { int ival; string s; }; //class Data //{ //public: // int ival; // string s; //}; int _tmain(int argc, _TCHAR* argv[]) { Data data = { 12, "hello" };//the initializers must appear in declaration order of the data members. cout << data.ival << endl; return 0; }
相关文章推荐
- 优化LINUX内核阻挡SYN洪水攻击
- 设计模式之单例、多例模式
- LintCode -- 不同的子序列
- 使用VirtualBox + Vagrant打造属于自己的开发环境1
- 安全cookie登录状态设计方案
- css过渡和动画初学
- MVC传值汇总
- SVN集成Checkstyle实现代码自动检查
- Android Studio的Gradle官方教程
- DP还是要熟练的好啊
- [iOS开发项目-4] 汤姆猫(只包含动作,没有发声功能)
- 利用HttpOnly来防御xss攻击
- JAVA学习第六天-小结
- LeetCode——Binary Tree Preorder Traversal
- Android的ActivityNotFoundException异常
- Ubuntu卸载umount硬盘
- Byte Array to Hexadecimal String
- iOS页面传值总结
- Hive的安装,以及Hive在eclipse中JDBC接口实现(ubuntu)
- 2015年9月21日-9月27日(共15小时,剩3470小时)