【发布时间】:2011-11-19 21:33:47
【问题描述】:
我想将字母的 ASCII 值存储到变量中,我该怎么做?
例如:
r ASCII variable = 82
main()
{
character = "character read from a file";
variable= "r ascii"; //(in this case 82), the problem is that the letter is always variable.;
printf( "the value of %c is %d, character, variable)
}
我该怎么做?
另外需要注意的是,我如何逐个字符地读取.txt 文件?所以它可以保存在字符变量中。
【问题讨论】:
标签: c file text ascii file-read