
c tips
文章平均质量分 53
fyplinux
这个作者很懒,什么都没留下…
展开
-
左移
#include#includeint main(){ int j; j = 1 j = 1= width of type printf("%d/n",j); return 0;} that is to say, 32 is assigned of 32 bits.Always aware the data types!shift is fater than * and原创 2007-09-27 04:52:00 · 676 阅读 · 0 评论 -
get password in terminal by C
I tried hard to use the first method of 密码输入关闭回显的两种方法 , which is named ncurses, the user interaction is very bad. the second method is better and works fine.A piece of code is ready to use:#include #原创 2008-03-19 00:18:00 · 667 阅读 · 0 评论 -
定位C程序内存错误
这些信息是 ubuntu 7.10 , gcc 4.1.3, gdb 6.6-debian 跟踪的当printf不够有效时。。。。1。读懂错误信息一个简单的例子;#include #include void a(){char *s = "ee";free(s);}int main(int argc, char **argv){a();return 1原创 2008-04-17 08:11:00 · 1848 阅读 · 0 评论