About 2,050,000 results
Open links in new tab
  1. What is a Vector? | Vector Magnitude, Components & Examples

    Nov 21, 2023 · A vector is a quantity that has both a direction and a magnitude. A magnitude is an abundance or a mathematical amount of something.

  2. What are vectors and how are they used in programming?

    I'm familiar with the mathematical/physics concept of a vector as a magnitude and a direction, but I also keep coming across references to vectors in the context of programming (for example …

  3. Slicing a vector in C++ - Stack Overflow

    May 27, 2018 · 0 To find a sub vector from index a to b, then, simply do this: vector<int> sub_vec(v.begin() + a, v.begin() + b + 1); This will create a Sub Vector from the a index to the …

  4. How is vector implemented in C++ - Stack Overflow

    Jan 7, 2020 · Since vector is a template, you actually should have its source to look at if you want a reference – if you can get past the preponderance of underscores, it shouldn't be too hard to …

  5. When should I use vector::at instead of vector::operator []?

    Since it is unlikely that an out of bounds access to a vector is part of the normal program flow (in the case it is, you're right: check beforehand with size instead of letting the exception bubble …

  6. std::vector versus std::array in C++ - Stack Overflow

    Dec 12, 2010 · std::vector is a template class that encapsulate a dynamic array 1, stored in the heap, that grows and shrinks automatically if elements are added or removed. It provides all …

  7. c++ - Vector of Vectors to create matrix - Stack Overflow

    I am trying to take in an input for the dimensions of a 2D matrix. And then use user input to fill in this matrix. The way I tried doing this is via vectors (vectors of vectors). But I have encount...

  8. Arrays vs Vectors: Introductory Similarities and Differences

    Feb 26, 2013 · What are the differences between an array and a vector in C++? An example of the differences might be included libraries, symbolism, abilities, etc. Array Arrays contain a …

  9. Why use a new call with a C++ 'vector'? - Stack Overflow

    Feb 13, 2018 · std::vector<int>* v = new std::vector<int> v is a pointer to a dynamically allocated object, that dynamically allocates memory in order to store elements. As said already, you …

  10. How to get the Azure assistant to use the vector store using SDK

    Jan 17, 2025 · I've created a Vector store as well as an Assistant within Azure AI Foundry -> Azure OpenAI Service Using the SDK (link above) and the assistantID I'm trying to run a …