易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux 下getch()和getche()

Linux下getch()和getche()
I would recommend never mixing input techniques in a program. Don't mix fgets() or scanf() with getchar(). Don't mix any standerd C library input function with a non-standard function that bypasses the C stream mechanism, be that getch(), getche(), bioskey(), or anything else. Note that these functions do not read from stdin, they read from a hardware keyboard, which is not the same thing.
 
 
 
Functions like getch() and getche() haven't been incorporated into the C standard because not all host systems provide ways to turn off input buffering. Thus compilers include these as common extensions wherever possible.
 
 
 
 
It is worth pointing out that writing Standart C (or Standart POSIX or whatever) is not always useful or desirable. It is up to the programmer to decide when and whether the benefits of sticking to any particular standards are worth their costs. But in order to make such a decision (and execute it), information *about* those standards is very important.
 
 
 
希望大家能够写出自己的getch() or getche()。
 
 
 
以上是在网站http://bytes.com上的摘录,链接为http://bytes.com/topic/c/answers/476130-getch-getche
 


相关文档:

Linux下安装JDK,及相关环境变量配置

Linux安装JDK步骤1. 先从网上下载jdk(jdk-1_5_0_02-linux-i586.rpm) ,推荐SUN的官方网站www.sun.com,下载后放在/home目录中,当然其它地方也行。
进入安装目录
#cd /home
#cp jdk-1_5_0_02-linux-i586.rpm /usr/local
#cd /usr/local
给所有用户添加可执行的权限
#chmod +x jdk-1_5_0_02-linux-i586.rpm.bin
#./jd ......

linux一些命令

Linux常用命令参考
 
1. diff
用于文件比较。一般file1是原文件,file2是新(修改过)的文件。
紧凑模式:diff -u file1 file2
diff -u file1 file2
--- file1 2010-03-06 02:11:43.000000000 +0000
+++ file2 2010-04-14 10:06:45.000000000 +0000
@@ -21,11 +21,9 @@
eeeeee
ffffff
2222 ......

当两台LINUX主机之间要互传文件时可使用SCP命令来实现

当两台LINUX主机之间要互传文件时可使用SCP命令来实现
 
复制文件:
(1)将本地文件拷贝到远程
scp 文件名 --用户名@计算机IP或者计算机名称:远程路径
(2)从远程将文件拷回本地
scp --用户名@计算机IP或者计算机名称:文件名 本地路径
复制目录:
(1)将本地目录拷贝到远程
scp -r 目录名 用户名@计 ......

linux网络编程笔记

一 三种类型的套接字:
1.流式套接字(SOCKET_STREAM)
    提供面向连接的可靠的数据传输服务。数据被看作是字节流,无长度限制。例如FTP协议就采用这种。
2.数据报式套接字(SOCKET_DGRAM)
    提供无连接的数据传输服务,不保证可靠性。
3.原始式套接字(SOCKET_RAW)
   ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号