• Saves Valuable Time
  • Trusted Accuracy for 12 Years
  • 15-Day Money-Back Guarantee

VB Equivalent to C++ std::vector

The nearly exact VB equivalent to the C++ std::vector collection is the .NET List collection.

C++ VB
#include <vector>

void Vector()
{
    std::vector<int> myList;
    myList.push_back(1);
    int i = 1;
    myList[0] = i;
    i = myList[0];
}
Imports System.Collections.Generic

Sub Vector()
    Dim myList As New List(Of Integer)()
    myList.Add(1)
    Dim i As Integer = 1
    myList(0) = i
    i = myList(0)
End Sub


Use C++ to VB Converter to convert from C++ to VB.     


Copyright © 1997 – 2017 Tangible Software Solutions Inc.