为什么是char类型
char KeyWord[Total][MaxLength]是什么意思
const int Total=63; //
const int MaxLength=20;
char KeyWords[Total][MaxLength] //列举关键字
{
"asm","auto","bool","break","case",
"catch","char","class","const","const_cast",
"continue","default","delete","do","double",
"dynamic_cast","else","enum","explicit","export",
"extern","false","float","for","friend",
"goto","if","inline","int","long",
"mutable","namespace","new","operator","private",
"protected","public","register","reinteroret_cast","return",
"short","signed","sizeof","static","static_cast",
"struct","switch","template","this","throw",
"true","try","typedef","typeid","typename",
"union","unsigned","using","virtual","void",
"volatile","wchar_t","while",
};
你把char [Total][MaxLenght]想成string [Total]就行了,这个二维数组,每一行是一个char数组,就是一个string,每一行的每一列都是一个字母,
比如第一行是'a','s','m',第二行是'a','u','t','o',一共63行,也就是63个关键字,每个关键字最长20个字符