1

我的程序的第一行是:

/* Arquivo testaesparsas.c */

而且,在编译之后,我得到了那些(和许多其他的)错误消息:

visual studio 2010\projects\matrizes esparsas\matrizes esparsas\testeesparsas.c(1): error C2061: syntax error : identifier 'testaesparsas'

visual studio 2010\projects\matrizes esparsas\matrizes esparsas\testeesparsas.c(1): error C2059: syntax error : ';'

visual studio 2010\projects\matrizes esparsas\matrizes esparsas\testeesparsas.c(1): error C2059: syntax error : '.'

visual studio 2010\projects\matrizes esparsas\matrizes esparsas\testeesparsas.c(1): warning C4138: '*/' found outside of comment

令人惊讶的是,我在错误消息中发现了附加到本机库(如 stdio.h)的错误:

1>c:\arquivos de programas\microsoft visual studio 10.0\vc\include\stdio.h(245): error C2059: syntax error : ')'

1>c:\arquivos de programas\microsoft visual studio 10.0\vc\include\stdio.h(247): error C2143: syntax error : missing '{' before '__cdecl'

1>c:\arquivos de programas\microsoft visual studio 10.0\vc\include\stdio.h(247): error C2146: syntax error : missing ')' before identifier '_DstSize'

1>c:\arquivos de programas\microsoft visual studio 10.0\vc\include\stdio.h(247): error C2081: 'size_t' : name in formal parameter list illegal

可能会发生什么?

4

1 回答 1

0
visual studio 2010\projects\matrizes esparsas\matrizes esparsas\testeesparsas.c(1): warning C4138: '*/' found outside of comment

尝试嵌套注释或在注释前键入“*”可能会导致此警告:

int */*comment*/ptr;

或者

a = b */*comment*/c;
于 2016-04-16T17:44:04.983 回答