Im doing c++ excercises and it asks me to initialize a vector with an array after showing how its done but when i try it myself it dont work.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
|
#include <iostream>
#include <string>
#include <vector>
#include <iterator>
using std::cin; using std::cout; using std::endl; using std::string;
using std::vector;
int main()
{
int arr_int[] = {0, 1, 2, 3, 4, 4};
vector<int> vec(begin(arr_int), end(arr_int));
cin.clear();
cin.get();
return 0;
}
|
Last edited on
Ah, that most useful of descriptions.
Last edited on
u could copy and paste it and see what ur compiler says maybe
i figured out the problem, you was very helpful.