c++ - C2440 when I try to initialize a std::vector -
when try initialize std::vector of float[4] c2440 compiler error. have got error message:
error c2440:
return: cannot convertfloat [4]float (&&)[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 on this page, don't total understanding why c2440. ideas?
Comments
Post a Comment