錯誤 C2628: 'SqStack' followed by 'void' is illegal 通常因在 **C++ 專案** 中編譯 **C 風格代碼** (如結構體未 typedef、混用 // 註解、變數宣告不在區塊開頭等)。
.c 副檔名,VS 會自動用 C 編譯器 (cl.exe /TC)。typedef struct { ... } SqStack; 或宣告變數時加 struct SqStack。/std:c11 / /std:c17)。// 註解 (C89),改用 /* */。typedef struct {
SElemType *base;
SElemType *top;
int stacksize;
} SqStack; // 現在可直接用 SqStack 宣告變數
套用上述設定後,原始碼即可在 Visual Studio 正常編譯運行。