88问答网
所有问题
vc++2010中绘图时出现error C2065: 'pDC' : undeclared identifier,怎么解决?????
如题所述
举报该问题
其他回答
第1个回答 2011-04-19
是说“pDC”指针没有定义。
可以定义如下:CDC* pDC = GetDC(); 或者GetClientDC(),关键看你是想在哪个窗口上绘图!本回答被提问者采纳
第2个回答 2011-04-20
函数,可能是少头文件,如果是变量那就是之前没定义
第3个回答 2011-04-20
明显是 pDC没有定义嘛,自己定义就OK了
相似回答
C
++
error
C2065:
undeclared
identifier
答:
修改后:另外你的算法还有问题。include<iostream> using namespace std;const int Maxsize=100;template<class datatype> class SeqList { public:SeqList( );SeqList(datatype a[],int n);~SeqList(){};int Length();datatype Get(int i);void Insert(int i,datatype item);datatype Delet...
【
VC++
】
error
C2065:
'IDD_SHOW_DIALOG' :
undeclared
identifier
答:
error
C2065:
'IDD_SHOW_DIALOG' :
undeclared
identifier
即你的对话框IDD_SHOW_DIALOG没有定义,你看看资源中的ID是不是与这个相同?这里是否写错了。
error
C2065:
'p'
:undeclared
identifier
答:
这里加个p,改为:float r5,r3,r2,r1,r0,p,p1,p2,p3,p4,p5;
...
出现
“
error
C2065:
'C' :
undeclared
identifier
”是哪出错了?_百...
答:
你的代码的倒数第三行:end
;c
/c++里面没有end这个关键字,所以这个语句
错误,
直接删掉就行了
error
C2065:
'b' :
undeclared
identifier
这个
错误怎么
解决
答:
修改错误的方法如下:把int a, b;这一句移到函数最开始,printf之前。这是因为
C
程序要求全局变量在最开始定义,局部变量可以在使用的局部最前面定义。全局变量其作用范围是“整个工程”,只需在一个源文件中定义,就可以作用于所有的源文件。当然,其他不包含全局变量定义的源文件需要用extern 关键字再次...
c
++
编程总是
error
C2065:
'printf' :
undeclared
identifier
答:
需要包含头文件stdio.h 在文件的最上面加上 include <stdio.h>即可 因为printf和getchar这两个函数都是在stdio.h头文件中定义的,不包含这个头文件的话,就不能使用这两个函数,编译无法通过。
error
C2065:
'rand' :
undeclared
identifier
答:
C++被编译器自动引用, 而VC6.0就不会自动引用 必须显示的 include<xxx.h> 或者include"xxx.cpp"(我觉得应该是#include <stdlib.h> 和#include(后者保证每次的随机数不一样)) 将文件包含进来就可以啦! 如果rand()方法是自己写的 在vc6.0中一定要先于main函数定义一下。
c语言
错误
提示
:error
C2065:
'bool' :
undeclared
identifier
答:
C语言里没有bool类型。你可以自己定义一个bool类型。define bool int 就可以了。
大家正在搜
vc怎么实现画图功能
vc内存dc绘图
mfc绘图gpu
vc输入中文时不能选择中文
vc绘图程序
vc三维绘图
vc图形绘制类
vc矢量图绘制
mfc绘图的三种方式
相关问题
在vc++6.0中调试出现error C2065:'unde...
在VC++中运行出现error C2065: 'kbhit'...
error C2065:'strlen' : undecla...
用VC++编程时error C2065: 'access' ...
VC++ error C2065: 'WSADATA' : ...
在vc++6.0中出现error C2065: 'input...
error C2065: 'add' : undeclare...
在VC中调用updatedata()函数,为什么显示“err...