【发布时间】:2013-06-03 18:01:27
【问题描述】:
我在 AOP 中工作,在 Ubuntu 虚拟机中使用 AspeCt。我的.acc 代码:
before (): execution(int main(void)) {
printf("Before test successful!\n");
}
after (): execution(int main(void)) {
printf("world!\n");
}
before():
call(foo) {
printf("Before Foo!\n");
}
我的.mc 代码:
void foo(void) {
printf("foo\n");
}
int main() {
printf("Hello everyone ");
foo();
return 0;
}
以及错误信息:
1:13: error: expected declaration specifiers before ':' token
4:1: error : expected declaration specifiers before 'after'
7:1: error: expected declaration specifiers before 'before'
12:1 expected '{' at end of input
请帮忙?我很困惑如何解决这个问题!谢谢
【问题讨论】:
标签: c compiler-errors aop declaration aspect