面向过程版
#include<iostream>
#include<conio.h>
using namespace std;
struct Node;
#define N 11
typedef Node* 节点针;
struct Node{
wchar_t data;
节点针 nextPos;
};
Node 拉丁表[N + 1];
const Node*尾哨兵 = &拉丁表[N-1];
wchar_t*大写阿拉伯数字 = L"零壹贰叁肆伍陆柒捌玖拾";//----11个
void 循环表(){
for (int i = 0; i < N; i++){
拉丁表[i].nextPos = &拉丁表[i + 1];
拉丁表[i].data = 大写阿拉伯数字[i];
}
拉丁表[N - 1].nextPos = &拉丁表[0];
拉丁表[N - 1].data = 大写阿拉伯数字[N - 1];
}
void 测试(){
节点针 p = 拉丁表;
for (int i = 0; i < 15; i++, p = p->nextPos){
wcout << p->data;
}
wcout <<endl<< p->data;
}
void 打印拉丁表(){
节点针 p = 拉丁表;
cout <<endl<<"拉丁方阵表生成如下:"<<endl<<endl;
for (int i = 0; i != N; i++)
{
wcout << endl;
p = p->nextPos;
p = p->nextPos;
p = p->nextPos;
for (int j = 0; j !=