ChinaUnix.net
相关文章推荐:

定义全局变量

在A.c 和B.c 中 都定义全局变量 G Makefile: All_C = ... A.c B.c All_H = ... a.out: ... A.o B.o .... 编译却能通过。。 奇怪

by nile - C/C++ - 2003-04-08 08:55:40 阅读(5203) 回复(10)

相关讨论

如题 是否php默认条件下有个文件专门定义全局变量 php5

by ttl_web - PHP - 2007-08-28 18:23:30 阅读(1854) 回复(1)

c里面的全局变量errno在哪定义

by xltao - C/C++ - 2006-07-02 12:34:27 阅读(6526) 回复(26)

提交表单 全局变量定义! php4.4.0 +apache2+zend1.3 外部变量 </tilte> </head> <body> <? if(isset($_POST['submit'])){ echo "提交的内容是$_POST[con]"; }else{ ?> <form method="POST" action="8.3.3.php"> 提交的内容: <input type="text" name="con"> <input type="submit" name="submit" value="submit"> </form>; <? } ?> </body> </html> zend studio调试环境: php:/usr/www/7/8.3... </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-2273187.html" target="_blank">sharkman2004 </a> - <a href="http://bbs.chinaunix.net/forum-27-1.html" target="_blank">PHP</a> - 2006-05-24 13:20:52 阅读(994) 回复(1) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-1060371-1-1.html" target="_blank"> 关于多个相同<font color="red">全局变量</font>在不同模块中<font color="red">定义</font>的问题 </a></h2> </div> <p> /*test1.c*/ #include<stdio.h> void f(void); int x=15213; int y=15212; int main() { f(); printf("x=0x%x,y=0x%x\n",x,y); return 0; } ============================ /*test2.c*/ double x; void f() { x=-0.0; } ============================ 在IA32/linux机器上运行结果如下: x=0x0,y=0x80000000 有没有哪位高人能解释一下 非常感谢!!! </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-20632973.html" target="_blank">joe_zh128 </a> - <a href="http://bbs.chinaunix.net/forum-23-1.html" target="_blank">C/C++</a> - 2008-03-04 22:33:34 阅读(4122) 回复(13) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-1049006-1-1.html" target="_blank"> uclinux中的makefile ,<font color="red">全局变量</font>MAKE在哪<font color="red">定义</font>的 </a></h2> </div> <p> uclinux中的makefile ,<font color="red">全局变量</font>MAKE在哪<font color="red">定义</font>的 应该在某个文件中<font color="red">定义</font>吧,就像linux中的<font color="red">全局变量</font><font color="red">定义</font>在etc/profile中 对于文件的结构层次还不是很了解,请高手指点一下 [ 本帖最后由 ehyyngp 于 2008-1-30 09:44 编辑 ] </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-311680.html" target="_blank">ehyyngp </a> - <a href="http://bbs.chinaunix.net/forum-23-1.html" target="_blank">C/C++</a> - 2008-01-30 11:08:28 阅读(1923) 回复(1) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-971796-1-1.html" target="_blank"> C语言<font color="red">全局变量</font>和函数<font color="red">定义</font>static有什么用? </a></h2> </div> <p> C语言<font color="red">全局变量</font>和函数<font color="red">定义</font>static有什么用? </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-20571170.html" target="_blank">ATmega32 </a> - <a href="http://bbs.chinaunix.net/forum-23-1.html" target="_blank">C/C++</a> - 2007-08-04 19:20:54 阅读(3659) 回复(2) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-816783-1-1.html" target="_blank"> 如何自<font color="red">定义</font>设置一个 <font color="red">全局变量</font> ?? </a></h2> </div> <p> 有这样一个需求,比如我的数据库中一些存储过程需要一些外界的配置变量(类似于程序的config文件),一个简单的办法就是创建一个config表,插入 需要配置的变量名和默认值,当存储过程运行时,查询这个表来取得相应的值,然后在进行判断决定流程的处理。一个最简单的例子:在存储过程中进行 log记录,我需要配置一下目前要记录的log的级别和类型。 问题时,这样在每次运行时都要去多查询一张表,是在太浪费资源,而很多这样的配置... </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-8001250.html" target="_blank">xyhe </a> - <a href="http://bbs.chinaunix.net/forum-18-1.html" target="_blank">PostgreSQL</a> - 2006-10-29 16:24:17 阅读(5148) 回复(3) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-776203-1-1.html" target="_blank"> 内核模块中如何<font color="red">定义</font>别的模块可以访问的<font color="red">全局变量</font> </a></h2> </div> <p> 再一个内核模块中<font color="red">定义</font>一个变量,比如是int count;希望别的模块可以访问这个变量,应该怎么做? 我在别的模块中extern int count;这样可以编译通过,但是kldload的时候可以出错。 </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-20425546.html" target="_blank">ktrudger </a> - <a href="http://bbs.chinaunix.net/forum-5-1.html" target="_blank">BSD</a> - 2006-06-19 16:45:19 阅读(2232) 回复(1) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-704763-1-1.html" target="_blank"> 两种<font color="red">全局变量</font><font color="red">定义</font>-声明方式,哪个更好呢? </a></h2> </div> <p> 方式一: file a.h: [code] extern var; void func_b(); [/code] file a.c: [code] int var; main() { var=11; func_b(); } [/code] file b.c: [code] #include "a.h" void func_b() { printf("%d",var); } [/code] 方式二: file a.h: [code] /*no extern here*/ void func_b(); [/code] file a.c: [code] int var; main() { var=11; func_b(); } [/code] file b.c: [code] #include "a.h" extern var; void func_b() { p... </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-20256967.html" target="_blank">xb_parasite </a> - <a href="http://bbs.chinaunix.net/forum-23-1.html" target="_blank">C/C++</a> - 2006-02-23 12:03:19 阅读(5954) 回复(10) </div> <div class="two_con1"> <div class="tit5"> <h2><a href="http://bbs.chinaunix.net/thread-521561-1-1.html" target="_blank"> C语言最多可以<font color="red">定义</font>多少个<font color="red">全局变量</font>啊? </a></h2> </div> <p> 跟什么有关啊? 跟编译器有关? 跟内存大小有关? </p> <p class="news_tag"> </p> </div> <div class="two_con2"> by <a href="http://bbs.chinaunix.net/space-uid-20145134.html" target="_blank">lgchenxu </a> - <a href="http://bbs.chinaunix.net/forum-23-1.html" target="_blank">C/C++</a> - 2005-05-23 12:16:43 阅读(4768) 回复(7) </div> </div> <div class="friendly_link"> <div class="friendly_con1"> <div class="f_link_tit">盛拓传媒:</div> <p><a href="http://www.it168.com">IT168</a> | <a href="http://www.pcpop.com">泡泡网</a> | <a href="http://www.autohome.com.cn">汽车之家</a> | <a href="http://www.che168.com">二手车之家</a> | <a href="http://www.qudao168.com">渠道168</a> | <a href="http://www.itpub.net/">ITPUB</a> | <a href="http://www.ixpub.net/">IXPUB</a> | <a href="http://www.chinaunix.net/">ChinaUnix</a> | <a href=" http://www.jimi168.com/">安卓之家</a> | <a href="http://www.app111.com/">苹果园</a> | <a href="http://www.gqt168.com/">家商城</a> | <a href="http://bbs.app111.com/">苹果论坛</a></p> <div class="clear"></div> </div> </div> <div id="footer"> <div class="dot1"><a href="http://www.bj.cyberpolice.cn/index.jsp" class="n1"></a><a href="http://www.hd315.gov.cn/beian/view.asp?bianhao=010202008062400006"></a><a href="http://ulic.baidu.com/client/clientDetailCerInfo.do?id=1602"></a></div> <p class="p"> <a href="http://www.it168.com/bottomfile/about.shtml" rel="nofollow">盛拓传媒简介</a> | <a href="http://www.it168.com/bottomfile/it168.shtml" rel="nofollow">关于IT168</a> | <a href="http://www.it168.com/bottomfile/hzhb.shtml" rel="nofollow">合作伙伴</a> | <a href="http://www.it168.com/bottomfile/ggfw.shtml" rel="nofollow">广告服务</a> | <a href="http://www.it168.com/bottomfile/sytk.shtml" rel="nofollow">使用条款</a> | <a href="http://www.it168.com/bottomfile/tgzn.shtml" rel="nofollow">投稿指南</a> | <a href="http://www.wintalent.cn:8031/wt5/sequelmedia/web/index" rel="nofollow">诚聘精英</a> | <a href="http://www.it168.com/bottomfile/lxwm.shtml" rel="nofollow">联系我们</a> | <a href="http://www.itpub.net/forum.php">ITPUB论坛</a> | <a href="http://www.it168.com/bottomfile/sitemap/sitemap.html" rel="nofollow">网站导航</a> | <a href="http://archive.it168.com/" rel="nofollow">往日回顾</a> </p> <address> 北京皓辰网域网络信息技术有限公司. 版权所有 <a href="http://www.it168.com/images/icp.jpg"><font color="#666666">京ICP证:060528号</font></a> 北京市公安局海淀分局网监中心备案编号:1101082001<br> <font color="#666666">广播电视节目制作经营许可证:编号(京)字第1149号</font> </address> <div style=" color:#666;margin-top:10px; text-align:right;">ITPUB推荐文章解答你所有技术难题</div> <div class="clear"> </div> </div> </div> <!-- 统计 START --> <script language="javascript" src="http://stat.it168.com/pv.js"></script> <script> function sendPV(){ var pvTrack = new PvTrack(); pvTrack.type = 35; // 频道类别ID pvTrack.channel = 461; // 频道ID pvTrack.pageType = 0; pvTrack.track(); } window.setTimeout("sendPV()", 1000); </script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-20237423-2']); _gaq.push(['_setDomainName', '.chinaunix.net']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <div style='display:none'> <script type="text/javascript"> var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://"); document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F0ee5e8cdc4d43389b3d1bfd76e83216b' type='text/javascript'%3E%3C/script%3E")); </script></div> <!-- END STAT PV --> <!-- <script type='text/javascript' src='http://168.it168.com/js/597.js'></script> --> <script>if(typeof(BLA)!='undefined'){BLA();}</script> </body> </html>