int main()
{
vector<int> v = { 5, 7, 9, 4, 6, 8 };
for (int x:v)
cout << x << '\n';
}
when i compile this, i got these two error "Error 1 error C2440: 'initializing' : cannot convert from 'initializer-list' to 'Vector<std::string>'
2 IntelliSense: no instance of constructor "Vector<T>::Vector [with T=int]" matches the argument list
argument types are: (int, int, int, int, int, int)
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-47372.pdf
Comments
Leave a comment