用fgetc读取文件意外停止

时间:2019-01-04 11:02:37

标签: c

我正在尝试制作一个程序,在给定输入图像“ test.jpg”的情况下,在同一文件夹中创建复制图像“ copy.jpg”。

我已经写过:

TermMapping<-function(param){



###The list I want to refer to
tofind <-
  paste(
    c(
"Ascending","Descending","Sigmoid","Rectum","Transverse",
"Caecum","Splenic","Ileum","Rectosigmoid",
"Ileocaecal","Hepatic","Colon","Terminal","Terminal Ileum",
"Ileoanal","Prepouch","Pouch","Anastomosis",
"Stomach","Antrum","Duodenum","Oesophagus","GOJ"
),
collapse = "|"
)

###something done to param here- details not included but it uses the list above.....


return(list(my_df = dataframe,
    myList = tofind))
}

但是它只能循环打印255。

1 个答案:

答案 0 :(得分:3)

EOF的值不适合unsigned char(否则读取该值的字符不能与文件末尾区分开)。您需要拥有int d