
C语言
文章平均质量分 71
ryvipa
这个作者很懒,什么都没留下…
展开
-
c语言中的全局数组和局部数组
今天在A一道题目的时候发现一个小问题,在main函数里面开一个int[1000000]的数组会提示stack overflow,但是将数组移到main函数外面,变为全局数组的时候则ok,就感到很迷惑,然后上网查了些资料,才得以理解。对于全局变量和局部变量,这两种变量存储的位置不一样。对于全局变量,是存储在内存中的静态区(static),而局部变量,则是存储在栈区(stack)。这里,顺便普原创 2013-01-31 14:15:29 · 6640 阅读 · 0 评论 -
[转载]c语言中数组作为函数参数
点击查看原文 平常写代码时候,如果函数需要接受一个数组作为参数,我总是习惯把函数声明为具有指针参数的形式,比如:#include void func1(char *array, int len) { int i; for(i = 0; i < len; i++) /* do something */} void fun转载 2013-02-05 19:43:58 · 761 阅读 · 0 评论 -
PAT 1020. Tree Traversals (25) 根据树的中序与后序,求层序
Suppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the cor原创 2013-02-21 12:54:49 · 884 阅读 · 0 评论 -
Cannot find or open the PDB file
在vs2010下写程序调一个API,结果返回的句柄始终为NULL,GetLastError() = 126。说明LoadLibrary不成功,全部重新配置之后,Debug结果如下:Loaded 'C:\Windows\System32\ntdll.dll', Cannot find or open the PDB fileLoaded 'C:\Windows\System32\kern原创 2013-06-08 10:53:50 · 1585 阅读 · 0 评论