我在所有函数之外编写了这段代码:
int l, k;
for (l = 1; l <= node; l++)
{
for (k = 1; k <= node; k++)
{
flow[i][j] = capacity[i][j];
flow[j][i] = 0;
}
}
它在编译时给了我以下错误:
shalini@shalini-desktop:~$ g++ -o output fords.cpp
fords.cpp:63: error: expected unqualified-id before ‘for’
fords.cpp:63: error: expected constructor, destructor, or type conversion before ‘<=’ token
fords.cpp:63: error: expected constructor, destructor, or type conversion before ‘++’ tok