c++ - 对象即时 VB Net 的 vector

标签 c++ vb.net

我在 VB NET 中遇到 vector 问题。

我用C++编写了一段代码

typedef struct
{
    int process;
    int burstTime;
    int ArrivalTime;
    int remaining;
    int timeAddedToQ;
    bool flag;
} process;

vector<process> proc;

如何在 VB NET 代码中表示此 C++ 代码?

我尝试用 Google 搜索,但没有任何帮助。如果有人可以提供帮助,我将非常感激

谢谢

最佳答案

您通常会为Process创建一个类。信息,然后使用 List(Of Process)替换 vector<process> .

Public Class Process
    Property Process As Integer
    Property BurstTime As Integer
    Property ArrivalTime As Integer
    Property Remaining As Integer
    Property Flag as Boolean
End Class

' Use in code as:
Dim proc as New List(Of Process)

关于c++ - 对象即时 VB Net 的 vector ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18599929/

相关文章:

c++ - 无法使用 Code::Blocks 在 linux mint 中编译 C++

c++ - 加号/减号是否国际化?

移动文件时不显示 css

.net - 协议(protocol)错误|404 使用 HttpClient 或 WebClient 从 API 读取 JSON

c++ - 使用变量索引对 vector 的 vector 进行排序

Visual Studio 2008 中的 C++ "using"声明

sql - 我如何测试我是否通过 vb.net 连接到 sql DB?

Nullable(Of T) 对象上的 VB.NET 扩展,给出类型错误

vb.net - 如何在 vb.net 中捕获/处理数字格式异常?

c++ - 比较两个 multimaps c++