摘要:
问题:/usr/lib/gcc/i686-linux-gnu/4.4.5/http://www.cnblogs.com/http://www.cnblogs.com/lib/crt1.o: In function `_start':(.text+0x18): undefined reference to `main'collect2: ld returned 1 exit status解决:你的文件里找不到main函数,可能是main打错了 阅读全文
摘要:
/* who1.c - a first version of the who program * open,read UTMP file, and show results */#include<stdio.h>#include<utmp.h>#include<fcntl.h>#include<unistd.h>#include<stdlib.h>#define SHOWHOSTvoid show_info(struct utmp * utbufp);int main(){ struct utmp current_record; in 阅读全文
摘要:
/* more01.c - version0.1 of more * read and print 24 lines then pause for a few special commands */#include<stdio.h>#include<stdlib.h>#define PAGELEN 24#define LINELEN 512void do_more(FILE*);int see_more();int main(int ac, char *av[]){ FILE *fp;//定义一个FIEL指针 if(ac==1) { //显示... 阅读全文