
紧急求助:MFC中Array()的使用 50
在使用的过程中遇到的困难:1:用MFCAppWizard创建一个单文档应用程序框架2:在视图类的声明中定义一个存放CRect类型元素的数组m_Rectag:protect...
在使用的过程中遇到的困难:
1:用MFC AppWizard创建一个单文档应用程序框架
2:在视图类的声明中定义一个存放CRect类型元素的数组m_Rectag:
protected:
CArray<CRect,CRect&>m_Rectag;
但是就当只加上面的代码后运行程序却出现了 如下错误
--------------------Configuration: Test - Win32 Debug--------------------
Compiling...
Test.cpp
g:\mfc课本学习\test\testview.h(46) : error C2143: syntax error : missing ';' before '<'
g:\mfc课本学习\test\testview.h(46) : error C2501: 'CArray' : missing storage-class or type specifiers
g:\mfc课本学习\test\testview.h(46) : error C2059: syntax error : '<'
g:\mfc课本学习\test\testview.h(46) : error C2238: unexpected token(s) preceding ';'
TestView.cpp
g:\mfc课本学习\test\testview.h(46) : error C2143: syntax error : missing ';' before '<'
g:\mfc课本学习\test\testview.h(46) : error C2501: 'CArray' : missing storage-class or type specifiers
g:\mfc课本学习\test\testview.h(46) : error C2059: syntax error : '<'
g:\mfc课本学习\test\testview.h(46) : error C2238: unexpected token(s) preceding ';'
Generating Code...
Error executing cl.exe.
Test.exe - 8 error(s), 0 warning(s)
恳请大家帮我看看为什么(因为被这一步挡住我后面的代码根本就不能学习) 展开
1:用MFC AppWizard创建一个单文档应用程序框架
2:在视图类的声明中定义一个存放CRect类型元素的数组m_Rectag:
protected:
CArray<CRect,CRect&>m_Rectag;
但是就当只加上面的代码后运行程序却出现了 如下错误
--------------------Configuration: Test - Win32 Debug--------------------
Compiling...
Test.cpp
g:\mfc课本学习\test\testview.h(46) : error C2143: syntax error : missing ';' before '<'
g:\mfc课本学习\test\testview.h(46) : error C2501: 'CArray' : missing storage-class or type specifiers
g:\mfc课本学习\test\testview.h(46) : error C2059: syntax error : '<'
g:\mfc课本学习\test\testview.h(46) : error C2238: unexpected token(s) preceding ';'
TestView.cpp
g:\mfc课本学习\test\testview.h(46) : error C2143: syntax error : missing ';' before '<'
g:\mfc课本学习\test\testview.h(46) : error C2501: 'CArray' : missing storage-class or type specifiers
g:\mfc课本学习\test\testview.h(46) : error C2059: syntax error : '<'
g:\mfc课本学习\test\testview.h(46) : error C2238: unexpected token(s) preceding ';'
Generating Code...
Error executing cl.exe.
Test.exe - 8 error(s), 0 warning(s)
恳请大家帮我看看为什么(因为被这一步挡住我后面的代码根本就不能学习) 展开
展开全部
缺少头文件,在StdAfx.h中加入include"afxtempl.h"便可。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?

2022-08-05 广告
苏州蓝晓生物科技有限公司。标准化核心产品:公司拥有完整的琼脂糖介质、葡聚糖介质、聚甲基丙烯酸酯介质生产线,年产分离介质50000L,产品质量稳定并达到国际领先水平。核心优势:公司核心技术人员拥有近二十年不同基质的基球开发和官能化的丰富技术经...
点击进入详情页
本回答由苏州蓝晓生物科技有限公司_提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询