<分区>
我正在尝试编译此 C++ 代码:
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "general_configuration.h"
#include "helper_functions.h"
#define LINE_LEN 80
// file_with_as_ext returns 1 if the input has .as extension
int file_with_as_ext(char* input)
{
char* dot_value = strchr(input, '.');
if (dot_value == NULL)
return 0;
else
{
if (strcmp(dot_value,".as") == 0)
return 1;
}
}
但我收到错误 "C2144: syntax error : 'int' should be preceded by ';'"
我不明白为什么,因为 #define
最后不需要 ';'
。