请教:有一个文件test.in内容是6534要读取里面的内容,但是在读取完65后会读取到一个0然后才能读取到3代码如下file,err:=os.Open("test.in")iferr!=nil{panic(err)}varone,two,third,fourintfmt.Fscanf(file,"%d",&one)//one6fmt.Fscanf(file,"%d",&two)//two5fmt.Fscanf(file,"%d",&third)//third0fmt.Fscanf(file,"%d",&four)//four3如何避免读取到0多谢
白衣染霜花
相关分类