我有以下 cpp 文件,并且在这一行中抛出错误“预期声明”,指向“for”:
for (int i = 0; i < m_Floats.size(); ++i)
整个代码是:
#include "stdafx.h"
#include <vector>
#include "clsJenksBreaks.h"
using namespace std;
vector<float>m_Floats
vector<float>getJenksBreaks(const unsigned int uNumClass)
{
//std::sort(m_Floats, m_Floats + size, std::greater<float>());
float **mat1 = new float*[m_Floats.size()];
for (int i = 0; i < m_Floats.size(); ++i)
{
mat1[i] = new float[iNumClass];
}
for (unsigned long x=0;x<uNumClass+1;x++)
{
for (unsigned long y=0;y<m_Floats.size()+1,y++)
{
mat1[x][y]=0;
}
}
//I have commented out the other code that is in this function, but the error still exists.
}
有人看到我哪里出错了吗?