#include <stdio.h>
#include <windows.h>
int main(void)
{
FILE *fp;
char temp;
char buf[100];
if((fp=fopen("com3","r"))==NULL) puts("Can't open com3 /n");
while(1)
{
temp=0;
fscanf(fp,"%c",&temp); 到这一步就go不下去了。
if(temp!=0)
putchar(temp);
else
Sleep(100);
}
fclose(fp);
return 0;
}
参考某大神源码…… 求指教…… |