我的代码就像一个文本压缩器,读取普通文本并变成数字,每个单词都有一个数字.它在DevC++中编译但不会结束,但是它不能在Ubuntu 13.10中编译.我收到的错误就像Ubuntu中的标题"未定义引用`strlwr'",我的代码有点长,所以我无法在这里发布,但其中一个错误来自:
//operatinal funcitons here
int main()
{
int i = 0, select;
char filename[50], textword[40], find[20], insert[20], delete[20];
FILE *fp, *fp2, *fp3;
printf("Enter the file name: ");
fflush(stdout);
scanf("%s", filename);
fp = fopen(filename, "r");
fp2 = fopen("yazi.txt", "w+");
while (fp == NULL)
{
printf("Wrong file name, please enter file name again: ");
fflush(stdout);
scanf("%s", filename);
fp = fopen(filename, "r");
}
while (!feof(fp))
{
while(fscanf(fp, "%s", textword) == 1)
{
strlwr(textword);
while (!ispunct(textword[i]))
i++;
if (ispunct(textword[i]))
{
i = 0; …Run Code Online (Sandbox Code Playgroud)