#include <initializer_list> struct Vector { float v[3]; Vector(std::initializer_list<float> values) : v(values) {} }; int main() { Vector v = {1, 2, 3}; }
Standard input is empty
prog.cpp: In constructor ‘Vector::Vector(std::initializer_list<float>)’: prog.cpp:7:59: error: incompatible types in assignment of ‘std::initializer_list<float>’ to ‘float [3]’
Standard output is empty