| 发表于:2007-08-21 09:55:12 楼主 |
这是我的程序 #include <iostream> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> using namespace std; int main() { int fd; fd=open( "/dev/lp0 ",o_rdwr); if(fd==-1) { cout < < "can 't open file " < <endl; cout < < "fd: " < <fd < <endl; //exit(0); } else { cout < < "nihao " < <endl; } close(fd); return 0; } 总是输出can 't open file ,打不开lp0,这是怎么回事,大家帮忙看看。 |
|
|
|
|