exagear模拟器数据包:一个字一个字的读文件,怎样判断空行呢?谢谢

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/05 09:45:21

char c;
FILE *fp = NULL;
if ((fp=fopen("filedir", "r")) == NULL)
prinft("can not open");
else {
while (feof(fp) != 0) {
fscanf (fp, "%c", &c);
if (c == '\n')
你的操作;
}
}

如果是VB里的话呢
dim fnasdin as string
open 路径 for input as #1
do unitl eof(1) = true
print #1,fnasdin
if fnasdin = "" then
自己写
end if
loop
close #1
建议去 www.vbgood.com 学VB