Saya mengikuti buku tentang pemrograman C++ dan saya terjebak pada vektor. Contoh dari buku tersebut berbunyi:
vector<int> v = {1,2,3};
tapi saya mendapatkan pesan kesalahan:
1 IntelliSense: no instance of constructor "Vector<T>::Vector [with T=int]" matches the argument list
argument types are: (int, int, int) ../path
Juga, ketika saya membuat vektor string:
vector<string> v = {"one", "two", "three"}
Saya mendapatkan kesalahan ini:
1 IntelliSense: no instance of constructor "Vector<T>::Vector [with T=std::string]" matches the argument list
argument types are: (const char [4], const char [4], const char [6]) ../path
Saya menggunakan VS 2013 dengan kompiler CTP November 2013. Apa yang saya lakukan salah?
#include <vector>
? - person Brian Bi   schedule 09.08.2014Vector<T>
, maksudku dengan huruf kapital V? - person 101010   schedule 09.08.2014std::vector<int> v = {1,2,3};
danstd::vector<std::string> v = {"one", "two", "three"};
dan laporkan kembali. - person 101010   schedule 09.08.2014"std_lib_facilities.h"
miliknya. - person T.C.   schedule 09.08.2014#define vector Vector
di dalamnya, yang telah menimbulkan pertanyaan SO untuk sementara waktu.) - person T.C.   schedule 09.08.2014