图形显示问题
写了一个菜单编辑项目,部分程序如下(程序代码:
:CMyDoc::CMyDoc() { // TODO: add one-time construction code here item=0; }void CMyDoc::OnShowcircle() { // TODO: Add your command handler code here item=1; UpdateAllViews(NULL); } void CMyDoc::OnShowline() { // TODO: Add your command handler code here item=3; UpdateAllViews(NULL); } void CMyDoc::OnShowrect() { // TODO: Add your command handler code here item=2; UpdateAllViews(NULL); }void CMyDoc::OnShowcircle() { // TODO: Add your command handler code here item=1; UpdateAllViews(NULL); } void CMyDoc::OnShowline() { // TODO: Add your command handler code here item=3; UpdateAllViews(NULL); } void CMyDoc::OnShowrect() { // TODO: Add your command handler code here item=2; UpdateAllViews(NULL); }
出现一下错误:
程序代码:
--------------------Configuration: 图形 - Win32 Debug-------------------- Compiling... 图形View.cpp c:\documents and settings\administrator\my documents\c++\图形\图形view.cpp(62) : warning C4551: function call missing argument list c:\documents and settings\administrator\my documents\c++\图形\图形view.cpp(63) : error C2450: switch expression of type '' is illegal Integral expression required 执行 cl.exe 时出错. 图形View.obj - 1 error(s), 0 warning(s)不明白这段是什么意思? (注释:这个程序目的是建立一个“显示图形”的菜单项,包括“圆形”、“矩形”、“直线”三个子菜单,运行并显示相应图形;相信大家会明白我的意思,其余的程序不用我上传了吧)