2010年3月2日

linux两个程序通过共享内存通信的一个简单例子

摘要: 写共享内存程序: /* * File: server.cpp * Author: centos *说明:从键盘读入数据,存放在共享内存中。 * Created on 2010年3月1日, 下午3:44 */#include #include #include #... 阅读全文

posted @ 2010-03-02 16:02 johnphan 阅读(388) 评论(0) 推荐(0) 编辑

linux 下连续使用多个scanf() 的问题和 fflush(stdin)的变通处理

摘要: linux 下连续使用多个scanf() 会有问题,实例: while (1) { printf("Please input: "); scanf("%s",pstr) ; } 这段程序运行会出问题,当一次输入后,会不停的提示Please i... 阅读全文

posted @ 2010-03-02 08:51 johnphan 阅读(264) 评论(0) 推荐(0) 编辑

导航