我有一个代码:
void switch (int *a, int *b)
{
int temp = *a;
*a = *b;
*b = temp;
}
这是我通过这个 .h 文件包含在其他 .c 文件中的功能:
#ifndef SWITCHINT_H
#define SWITCHINT_H
void switch (int *a, int *b);
#endif
但控制台打印出:
switchInt.c:1:5: error: expected identifier or ‘(’ before ‘switch’
void switch (int *a, int *b);s
switchInt.h:4:6: error: expected identifier or ‘(’ before ‘switch’
void switch (int *a, int *b);
我应该怎么办?