When I try to simply initialize a std::vector
of float[4]
I get a C2440 compiler error. I have got this error message:
error C2440:
return
: cannot convert fromfloat [4]
tofloat (&&)[4]
C2440Exemple.h
:
#pragma once
#include <iostream>
#include <vector>
#include <array>
class C2440Exemple
{
public:
C2440Exemple();
~C2440Exemple();
private:
std::vector<float[4]> normData;
};
C2440Exemple.cpp
:
#include "stdafx.h"
#include "C2440Exemple.h"
C2440Exemple::C2440Exemple()
{
normData = std::vector<float[4]>(); // error C2440
}
C2440Exemple::~C2440Exemple()
{
}
I was on this page, but don't get a total understanding about why I get C2440. Any ideas?