c - 什么是 int cost[N] 在 vi​​sual basic 中

标签 c arrays vb.net algorithm

我有下面的代码可以翻译成 vb,我想知道那些括号是什么意思。 int cost[N][N]bool S[N]

有什么区别
#define N 55             //max number of vertices in one part
#define INF 100000000    //just infinity

int cost[N][N];          //cost matrix
int n, max_match;        //n workers and n jobs 
int lx[N], ly[N];        //labels of X and Y parts

最佳答案

What's the difference between int cost[N][N] and bool S[N] ?

它们是两种不同类型的数组。
cost[N][N] 是大小为 NxN 的二维整数数组,而 bool[N] 是大小为 的一维 bool 数组>N

视觉基本转换

int cost[N][N]; ==> Dim cost(N-1,N-1) As Integer
int s[N];       ==> Dim s(N-1) As Integer

参见 VB tutorial

关于c - 什么是 int cost[N] 在 vi​​sual basic 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19200936/

相关文章:

.net - 字符串数组需要声明吗?

asp.net - Asp 将查询放入数组并在不刷新页面的情况下通过它

c - 是否必须将未定义的行为定义为未定义?

python - 动态规划递归求解

c - 从 C 程序执行 "echo $PATH"?

arrays - 在Lua中将数组作为函数参数传递?

javascript - 如何使用 Javascript Underscore.js 的 _.sortBy() 方法在 javascript 中按多个键对对象数组进行排序?

actionscript-3 - Actionscript 3 ByteArray 异或?

javascript - 停止 ASP.NET 按钮的页面重新加载

c - 如何创建符号表?