#pragma once #include #ifndef IO_H #define IO_H void OutPut(int* arr/*I*/, int Arraylength/*I*/); void InPutArrayLength(int *Arraylength/*O*/); //05/23/2024 Li SiHan Added Start //用于遍历数组并输出的模板函数声明及函数体 template void foreach(ObjectTraversed obj, int Arraylength) { for (int i = 0; i < Arraylength; i++) { if (*obj < 10) { std::cout << " " << *obj << " "; } else { std::cout << *obj << " "; } obj += 1; } } //05/23/2024 Li SiHan Added End #endif