Page MenuHomeFeedback Tracker

Error when initializing an array of vectors.
New, NormalPublic

Description

vector twoVectors[2] = { { 1, 2, 3 }, { 4, 5, 6 } };

Above code generates two errors:

Array initialization of non-array type 'vector'
Array initialization of non-array type 'vector'

This is wrong because a vector can be array initialized no problem.
vector v = { 1, 2, 3 };

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Category
General

Event Timeline