学c鱼 发表于 2018-8-13 21:11:17

c语言基础求助!!

while.obj : error LNK2001: unresolved external symbol _getcher
Debug/while.exe : fatal error LNK1120: 1 unresolved externals
↑↑↑我想知道一下这个是什么错误,应该要怎么改正???编译出来是没错的,为什么执行的时候就不行了???

以下是我的源代码:
#include<stdio.h>

void main()
{
        int n = 0;
        printf("input a string\n");
        while ( getcher()!='\n' )
        {
                n++;
        }
        printf("%d", n);
}

小甲鱼的二师兄 发表于 2018-8-13 21:57:59

#include <stdio.h>

中间要有个空格

beijudezixuan 发表于 2018-8-13 22:49:51

getchar()      不是getcher()

aiqinghuilaidao 发表于 2018-8-14 08:59:39

是getchar()吧

种花家吾姓庄 发表于 2018-8-14 11:14:28

char

学c鱼 发表于 2018-8-14 22:09:26

不好意思了各位,居然犯这种低级错误,心累{:5_104:}

annan327 发表于 2018-8-15 18:17:02

最怕的就是粗心了 学习到了
页: [1]
查看完整版本: c语言基础求助!!