我有下面的代码可以翻译成 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] 在 visual basic 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19200936/