c语言 error C2065: “a”: 未声明的标识符

作者&投稿:申仲 (若有异议请与网页底部的电邮联系)
关于error C2065:"a":未声明的标识符,为什么我表示了还会错~

你的c=b和a=1都是错的。应该写成:
c==b
a==1
在c语言中,一个等于号(=)只能赋值,不能比较大小,比较相等的运算符必须要用连写的两个等号(==)。

引入相关的头文件,其位置也要放正确。当然预编译头文件应该放在最前位置或者考虑定义是否在其他头文件内而又没包含其该文件

把a改成你定义的letter就可以了。

printf("The capttal is %d",letter+'A'-'a');//改成就对了


就是说变量a,未定义啊,我看了你的程序,应该将a改为letter


岚皋县19618677013: c语言运行出现 error C2065: 'printf' : undeclared identifier是什么意思?怎么改啊 -
人秦甲紫: 需要咋程序最开始加上#include <stdio.h>这个头文件.include 称为文件包含命令,其意义是把尖括号""或引号<>内指定的文件包含到本程序中,成为本程序的一部分.被包含的文件通常是由系统提供的,其扩展名为.h stdio.h就是指“standard...

岚皋县19618677013: C语言sort函数提示error C2065: 'sort' : undeclared identifier. -
人秦甲紫: #include<stdio.h>#include<math.h>#include <algorithm>#include <iostream> using namespace std; 要加上using namespace std; 这个就好了.

岚皋县19618677013: C语言 error c2065 错误 -
人秦甲紫: 应该是:dispatchmessage,注意大小写!它们是不一样的!

岚皋县19618677013: c语言错误提示:error C2065: 'bool' : undeclared identifier -
人秦甲紫: C语言里没有bool类型.你可以自己定义一个bool类型.#define bool int 就可以了.

岚皋县19618677013: C语言中,出现"error c2065:'clrscr':undeclared identifie -
人秦甲紫: otoxy()函数是dos下的tc或者bc环境才能运行,不是vc++中的标准函数,你试试这样#include<stdio.h>#include<conio.h>#include<dos.h>#include<stdlib.h>//#include<system.h> main() {// clrscr();// cls(); system("cls()");// system("gotoxy()");// gotoxy(35,12); printf("Hello World!"); return 0; }

岚皋县19618677013: C语言里面报 error C2065: 'LLONG - MAX' : undeclared identifier是什么错误 -
人秦甲紫: #include

岚皋县19618677013: c语言编译时出现error C2065: 'str' : undeclared identifier -
人秦甲紫: 自己写一个函数int round(fload f){if ((int)f+0.5>f)return (int)f;elsereturn (int)f + 1;}

岚皋县19618677013: c语言 显示error C2065: 'number' : undeclared identifier -
人秦甲紫: 你只在getlastbit函数里定义了一个 int型的变量number,但是并没有在main函数里定义变量number,报错信息是:没有找到(或者定义)变量number

岚皋县19618677013: error C2065: 'sqrt' : undeclared identifier C语言错误求高手解答 -
人秦甲紫: 头文件加#include <math.h>//sqrt是math中的函数, 而且你的内循环有问题, 更改如下: for(;b<=d;b++){ c=a%d;if(c==0)break;else if(b==d)printf("%d \n",a);}完整程序如下 #include <math.h> #include "stdio.h" void main() { int a,b,c,d;...

岚皋县19618677013: C语言报错.\ error C2065: 'x' : undeclared identifier -
人秦甲紫: int max(int x,int y) { int z;if (x>y) z=x; else z=y; return(z); }//x,y和int之间应该有个空格,这样才是对的,一开始的申明也要修改一下 //程序还可以在精简一下:#include<stdio.h> int max(int x,int y); //这个写在main的外面 void main() { int a,b,c; scanf("%d,%d",&a,&b); c=max(a,b); printf("max=%d\n",c); } int max(int x,int y) { return x>y?x:y; }

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网