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的更多相关文章

随机推荐

  1. 认识copy关键

    首先先引用阳神Sunny博客中的一道面试题: 用@property声明的NSString(或NSArray,NSDictionary)经常使用copy关键字,为什么?如果改用strong关键字,可能造 ...

  2. radio组件

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...

  3. 使用logminer分析日志文件

    实验环境 win7 64  oracle PL/SQL Release 11.2.0.1.0 - Productionhttp://blog.csdn.net/tianlesoftware/artic ...

  4. php笔记05:http协议中防盗链技术

    倘若我们自己在电脑上写了一个网站文件(可以是html,php文件等等),但是只希望本机可以访问这个文件,不希望别的电脑访问就需要这里的防盗链技术 1.我们在本地写了一个import.php文件: 而且 ...

  5. js按值传递还是按引用传递?

    js和其他大部分语言一样,有基本类型和引用类型.因此访问变量就有按值和按引用两种方式,但是传参的时候却只能按值传递.基本类型作为参数时按值传递自然无可厚非,但引用类型作为参数也按值传递就让人有点困惑了 ...

  6. bgycoding

    //add by zzw@曾志伟 2015-12-9 [碧桂园项目] begin if(condition.indexOf("glbdef8 = 'Y'")>0){ Stri ...

  7. zoj2432 hdoj1423 最长公共上升子序列(LCIS)

    zoj2431  http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2432 hdoj 1423 http://acm.hdu. ...

  8. JQ异步调用

    AjaxGet请求方式: <script type="text/javascript"> $.ajax({ type: "GET", dataTyp ...

  9. virtualbox安装ubuntu出现“The system is running in low-graphics mode”

    cd /etc/X11 sudo mv xorg.conf.failsafe xorg.conf sudo reboot 即可.

  10. UITextField文本字段控件的位置

    如果需要更改默认的UITextField清除按钮.左右视图等等控件的位置,可以通过如下设置: // 控制清除按钮的位置 (默认 width = 15 = height) -(CGRect)clearB ...