structDemo1
structDemo1
# include <iostream.h>
# include <malloc.h>
enum EType{
One = ,Tow,Three
}; struct S1{
int id ;
char name [];
long version ;
}; int main(void){
EType one = Tow;
cout << "one = " << one << endl ; cout << "hello world !! " << endl ;
cout << endl << "hello world !! << endl "; for (int i () ; i < ;i++){
EType type = (EType) i ;
if(One == type )
cout << " is One " << endl;
if(Tow == type)
cout << " is Tow " << endl;
if(Three == type)
cout << " is Three " << endl;
} cout << "i = " << i <<endl; S1 s1 = {,"s1",}; cout << " s1.id = " << s1.id << " , s1.name = " << s1.name << " , s1.version = " << s1.version << endl; S1 * ps1 = &s1;
cout << "ps1->id = " << ps1->id << endl; ps1 = (struct S1 *)malloc( sizeof(struct S1));
ps1->id = ; (*ps1).version = ;
cout << " ps1->id = "<< ps1->id << " ,(*ps1).version = " <<(*ps1).version << endl; return ;
}
structDemo1的更多相关文章
随机推荐
- javascript变量提升
提升是一种将变量和函数的声明移到函数作用域(如果不在任何函数内的话就是全局作用域)最顶部的机制. 提升影响了变量的生命周期,一个变量的生命周期包含3个阶段: 声明——创建一个新变量,例如var myV ...
- jhipster
Client side: yeoman,grunt,bower,angularjs Server side: maven,spring,spring mvc rest,spring data jpa
- 安装Sass的一些注意事项
文章的内容都来自网络: 1. RubyGems 镜像 2. compass watch,我们的Sass种如果出现了中文, 就会出现编译错误,我们需要: 找到ruby的安装目录,里面也有sass模块, ...
- Git之路--2
- ASP.NET反射
(转载至博客园 dodo-yufan) 两个现实中的例子:1.B超:大家体检的时候大概都做过B超吧,B超可以透过肚皮探测到你内脏的生理情况.这是如何做到的呢?B超是B型超声波,它可以透过肚皮通过向你体 ...
- uploadify上传控件使用
uploadify是JQuery的一个上传插件,实现的效果非常不错,并且带进度显示,我将给大家演示如何使用uploadify进行图片上传, 1.点我下载http://www.uploadify.com ...
- Jstl标签库/Filter过滤器
JSTLJSP Standard Tag Library JSP标准标签库 是Sun公司定义的一套标准,由Apache组织基于这套标准开发的一套标准库之后又转给Sun公司被称为JSTL,成为了java ...
- 时间处理总结(一).net
不断整理中... 获取当前时间DateTime.Now.ToString("d") ;//获取到的日期格式为eg :2013/11/14 时间格式只取年月日DateTime.Now ...
- editActionsForRowAtIndexPath(iOS8) tableview编辑(删除、插入、移动)
ios8 出来的左滑小菜单 可以自定义想要的按钮 (要求ios8以上) - (nullable NSArray<UITableViewRowAction *> *)tableView:(U ...
- 两款web api 调试工具
两款web api 调试工具: Fiddler (http://www.telerik.com/fiddler) Postman(http://www.getpostman.com/) 资源: Fid ...