zoukankan      html  css  js  c++  java
  • 静态全局变量得初始化

                                                                            静态全局变量得初始化0;        

    #include "common.h"
    #include <stdio.h>
    #include <stdlib.h>
    #include <math.h>
    
    #define PI     (3.141592)
    static float test_equation = 0;
    static char  letter_A = '\r';
    
    struct gammon_class
    {
    	int rou;
    	int yumi;
    	int mian_feng;
    	int fangfuji;
    	int zhiliang;
    	int length;
    	int annotate[50];
    	struct gammon_class * pNext;
    };
    
    static struct gammon_class  one_gammon;
    
    int main()
    {	
    	int i = 0;
    	while (1)
    	{
    		printf("多少根肉 %d\n", one_gammon.rou);
    		printf("多少玉米 %d\n", one_gammon.yumi);
    		printf("火腿多长 %d\n", one_gammon.length);
    		printf("火腿得pNode %p\n", one_gammon.pNext);
    		//for (i = 0; i < 50; i++)
    		{
    			printf("打印初始化注释%d\n", one_gammon.annotate[i]);
    		}
    		getchar();
    	}
    
    	return 0;
    } 
    

      

         

                                                                        

    一勤天下无难事。
  • 相关阅读:
    php对数字进行万。亿的转化
    新jdbc的应用
    3.8web网页设计的一篇作业
    我的新博客
    面向对象编程概念简述
    JS函数基本介绍
    JS中的变量和数据类型
    js语法基础
    父级塌陷清除浮动的五种方法
    flex布局
  • 原文地址:https://www.cnblogs.com/nowroot/p/12391735.html
Copyright © 2011-2022 走看看