vs2013 提示错误 34 error C2065: “VideoCapture”: 未声明的标识符

展开阅读全文

提示error C2065: “i”: 未声明标识符

02-15

/* intHist = computeIntegralHistogramMex(quantMatrix,height,width,prodQuant); computes the integral image of an image with */rnrnrn#include rn#include "mex.h"rnrnvoid mexFunction( int nlhs, mxArray *plhs[],rn int nrhs, const mxArray *prhs[] )rn rnrn int i,j,k,x1;rn double *quantMatrix, *intHist;rn int height,width,prodQuant;rn rn /* Check for proper number of arguments */rn rn if (nrhs != 4) rn mexErrMsgTxt("4 input argument required.");rn rn else if (nlhs > 1) rn mexErrMsgTxt("Too many output arguments.");rn rnrn if ( !mxIsDouble(prhs[0]) || mxIsComplex(prhs[0]) ||rn mxGetNumberOfDimensions(prhs[1]) != 2 )rn mexErrMsgTxt("input 1 (quantMatrix) must be a real double matrix");rn rn quantMatrix = mxGetPr(prhs[0]);rn height = mxGetScalar(prhs[1]);rn width = mxGetScalar(prhs[2]);rn prodQuant = mxGetScalar(prhs[3]);rn rn /* Create a matrix for the return argument */rn rn plhs[0] = mxCreateDoubleMatrix(prodQuant,(height+1)*(width+1),mxREAL);/* size of intHist*/rn rn intHist = mxGetPr(plhs[0]);rnrn rn rn for(i = 1;i <= height;i++)rn for(j = 1;j <= width;j++)rn rn x1 = floor(quantMatrix[(j-1)*height+(i-1)]);rn rn intHist[prodQuant*(j*(height+1)+i)+x1-1]=1; /* corresponding bin has value=1 at location (i,j) */rnrn for(k = 0;k < prodQuant;k++) rn intHist[prodQuant*(j*(height+1)+i)+k] += intHist[prodQuant*(j*(height+1)+i-1)+k] + intHist[prodQuant*((j-1)*(height+1)+i)+k] - intHist[prodQuant*((j-1)*(height+1)+i-1)+k];rn rn rn return; rnrn用Vs2010 提示error C2065: “i”: 未声明的标识符rn还有j,k,x1都是rn不知道是怎么回事呢 论坛

error C2065: “m_pStrategyDlg”: 未声明标识符

10-28

新手请教个问题,网上查了半天也没找到原因。rnTESTStrategy.h里定义一个对话框的(TestItpDialog* m_pStrategyDlg;),但在TESTStrategy.cpp里面Strategy_CreatWindow函数使用该变量时总是提示“error C2065: “m_pStrategyDlg”: 未声明的标识符”。rnTESTSTRATEGY.H代码:rn#pragma oncern#include "strategybase.h"rn#include "list"rn#include rn#include "map"rn#include "TestItpDialog.h"//TestItpDialog 类的头文件rnrnusing std::vector;rnusing std::list;rnusing std::map;rnrnconst int MAX_BAR_SIZE = 1000;rnrnclass TestStrategy :rnpublic CStrategyBasernrnpublic:rnTestStrategy(void);rn~TestStrategy(void);rnrnvirtual int Strategy_OnStart(IiTPInterface* piTP);rnvirtual int Strategy_OnStop(IiTPInterface* piTP);rnvirtual int Strategy_CreatWindow(HWND hWnd,HWND hWndParent);rnvirtual int Strategy_DestroyWindow(HWND hWnd);rnrnprivate:rnrnTestItpDialog* m_pStrategyDlg; // 策略窗口rnrn;rnrnTESTStrategy.cpp里rnint Strategy_CreatWindow(HWND hWnd,HWND hWndParent)rnrn// 创建策略窗口rnAFX_MANAGE_STATE(AfxGetStaticModuleState());rnm_pStrategyDlg = new TestTipDialog;rnif (NULL == m_pStrategyDlg)rnrnASSERT(FALSE);rnreturn -1;rnrnif (!::IsWindow(m_pStrategyDlg->GetSafeHwnd()) && !m_pStrategyDlg->Create(TestItpDialog::IDD))rn rn return -1;rn rnm_pStrategyDlg->ModifyStyleEx(WS_POPUP | WS_BORDER | WS_DLGFRAME,WS_CHILD);rn hWnd = m_pStrategyDlg->GetSafeHwnd();rnreturn 0;rnrnrn 论坛

没有更多推荐了,返回首页