ฉันกำลังติดตามหนังสือเกี่ยวกับการเขียนโปรแกรม C++ และติดอยู่กับเวกเตอร์ ตัวอย่างจากหนังสือไป:
vector<int> v = {1,2,3};
แต่ฉันได้รับข้อผิดพลาด:
1 IntelliSense: no instance of constructor "Vector<T>::Vector [with T=int]" matches the argument list
argument types are: (int, int, int) ../path
นอกจากนี้ เมื่อฉันสร้างเวกเตอร์สตริง:
vector<string> v = {"one", "two", "three"}
ฉันได้รับข้อผิดพลาดนี้:
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
ฉันใช้ VS 2013 กับคอมไพเลอร์ CTP เดือนพฤศจิกายน 2013 ผมทำอะไรผิดหรือเปล่า?
#include <vector>
ใช่ไหม? - person Brian Bi   schedule 09.08.2014Vector<T>
ฉันหมายถึงอะไรด้วยตัวพิมพ์ใหญ่ V? - person 101010   schedule 09.08.2014std::vector<int> v = {1,2,3};
และstd::vector<std::string> v = {"one", "two", "three"};
แล้วรายงานกลับ - person 101010   schedule 09.08.2014"std_lib_facilities.h"
ของเขา - person T.C.   schedule 09.08.2014#define vector Vector
อยู่ในนั้น ซึ่งได้สร้างคำถาม SO มาระยะหนึ่งแล้ว) - person T.C.   schedule 09.08.2014