int routineSource[51][3][20] 中三个数字分别表示什么

C++语言 码拜 5年前 (2016-05-07) 501次浏览
m_bitmap.LoadBitmap(IDB_BITMAP2);                                                           //把中国地质大学的图片加载进来
m_ShowJingDian=0;                                                                           //给控制变量赋值,要求就是输出每个景点的介绍
//==============================================================
//AdjacencyWDigraph<int>  m_AdjacencyWDigraph(10,1000);                                       //声明了一个对象,并且初始化每条边
int routineSource[51][3][20] = {
{},
{ {1},{2},{8} },
{ {2},{3,4,5},{7,27,15} },
{ {3},{2,49,4,5},{7,17,20,15} },
{ {5},{3,2,5,6,7},{20,27,19,13,28} },
{ {7},{2,3,4,6,15,14,8,13},{15,15,19,19,44,19,24,26} },
{ {4},{4,7,15,5},{13,21,33,19} },
{ {3},{4,6,9},{28,21,9} },
{ {4},{5,14,13,18},{24,24,12,33} },
{ {3},{7,30,10},{9,19,9} },
{ {4},{9,30,11,12},{9,17,11,14} },
{ {5},{10,30,31,35,12},{11,15,18,24,8} },
{ {3},{10,11,35},{14,8,24} },
{ {5},{8,5,14,19,18},{12,26,18,20,24} },
{ {8},{5,6,15,20,19,18,13,8},{18,20,28,36,30,36,18,26} },
{ {11},{6,30,31,29,28,27,26,20,19,14,5},{33,30,37,13,18,24,24,19,38,29,44} },
{ {1},{17},{9} },
{ {2},{18,16},{14,9} },
{ {7},{8,13,14,19,22,21,17},{33,24,36,8,14,26,14} },
{ {7},{13,14,15,20,23,22,18},{20,30,38,27,33,14,8} },
{ {5},{19,14,15,27,25},{27,36,19,32,11} },
{ {4},{18,22,23,37},{26,19,19,21} },
{ {4},{18,19,23,21},{14,14,20,19} },
{ {7},{19,24,38,37,21,22,40},{33,15,25,25,20,20,43} },
{ {6},{23,25,26,39,40,38,37},{15,12,27,21,30,25,36} },
{ {3},{20,26,24},{11,19,12} },
{ {5},{25,27,45,41,24},{19,12,23,10,27} },
{ {7},{15,28,33,45,26,20,32},{24,6,11,19,12,32,11} },
{ {4},{15,29,32,27},{18,8,11,7} },
{ {6},{15,28,30,31,32,6},{13,8,20,25,16,38} },
{ {8},{9,10,6,32,11,35,15,29},{19,17,37,21,16,33,31,22} },
{ {6},{15,11,30,35,32,29},{38,18,14,22,16,25} },
{ {6},{31,30,34,33,29,27},{16,21,20,14,16,11} },
{ {5},{34,32,27,45,46},{11,14,11,12,23} },
{ {3},{32,33,46},{20,11,30} },
{ {4},{12,11,31,36},{24,24,22,50} },
{ {1},{35},{50} },
{ {5},{21,23,24,40,48},{21,25,36,50,14} },
{ {4},{23,24,40,48},{25,25,30,23} },
{ {3},{24,40,42},{21,13,17} },
{ {7},{23,24,37,38,39,44,47},{43,30,50,30,13,18,22} },
{ {3},{26,42,45},{10,8,16} },
{ {5},{39,41,43,45,46},{21,8,8,18,20} },
{ {3},{42,44,46},{8,7,15} },
{ {4},{43,40,46,47},{7,18,20,21} },
{ {6},{26,27,33,41,42,46},{23,19,12,16,18,13} },
{ {7},{33,34,42,43,44,45,47},{23,30,20,15,20,13,32} },
{ {4},{40,44,46,50},{22,21,32,71} },
{ {3},{37,38,50},{14,23,17} },
{ {1},{3},{17} },
{ {1},{48},{17} }
};
/*
/*
CString str;
str.Format(_T(“%d”), routineSource[0][0][1]);
AfxMessageBox(str);
*/
for(int i=1;i<=50;i++){
for(int j=0;j<routineSource[i][0][0];j++){
m_AdjacencyWDigraph.Add(i,routineSource[i][1][j],routineSource[i][2][j]);
}
}
解决方案

20

数组 :
http://en.cppreference.com/w/cpp/language/array
建议你找本 C++ 的教材看一下吧

20

51个顶点,每个顶点中有3组,每组中有20个整数。

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明int routineSource[51][3][20] 中三个数字分别表示什么
喜欢 (0)
[1034331897@qq.com]
分享 (0)