using lvv::array; // These are plain C++, not a C++0x constructors. // Second set of curly braces is optional, but // some compilers issues warning if single set of braces is used. array<float,3> A = {{1., 2., 3.}}; array<float,3> B; array<float,3> C = {{10., 20., 30.}}; array<float,3> RES; B = 1.0; // all elements are assigned `1.0f` RES = A+C; // vector op RES += B; // vector op // you can send an array to iostream cout << "vector A : " << A << endl; cout << "vector B : " << B << endl; cout << "vector C : " << C << endl; cout << "vector RES : " << RES << endl; cout << "dot product: " << dot(A,B) << endl;