当前位置: 代码迷 >> C语言 >> C程序编译出错,为何找不出错误
  详细解决方案

C程序编译出错,为何找不出错误

热度:481   发布时间:2006-12-11 11:12:38.0
C程序编译出错,为何找不出错误

0.c
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(20) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(20) : warning C4550: expression evaluates to a function which is missing an argument list
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(21) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(21) : warning C4550: expression evaluates to a function which is missing an argument list
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(22) : error C2065: 'Display' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(22) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(25) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(40) : error C2236: unexpected 'struct' 'StudentScore'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2017: illegal escape sequence
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xca'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xe4'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xc8'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xeb'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xb3'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xc9'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xbc'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2018: unknown character '0xa8'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2065: 'n' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int '
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : warning C4024: 'printf' : different types for formal and actual parameter 1
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2143: syntax error : missing ')' before ':'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(46) : error C2059: syntax error : ')'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(47) : warning C4133: 'function' : incompatible types - from 'float [30]' to 'char *'
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(58) : error C2065: 'score' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(58) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(58) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(58) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(58) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(61) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(61) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(69) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(69) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(71) : warning C4244: 'return' : conversion from 'int ' to 'float ', possible loss of data
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(79) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(79) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(81) : warning C4244: 'return' : conversion from 'int ' to 'float ', possible loss of data
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(87) : error C2065: 'averageStu' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(87) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(87) : warning C4244: '=' : conversion from 'float ' to 'int ', possible loss of data
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(87) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(89) : error C2065: 'averageCourse' : undeclared identifier
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(89) : error C2109: subscript requires array or pointer type
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(89) : warning C4244: '=' : conversion from 'float ' to 'int ', possible loss of data
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(89) : error C2106: '=' : left operand must be l-value
C:\Program Files\Microsoft Visual Studio\MyProjects\0\0.c(100) : error C2236: unexpected 'struct' 'StudentScore'
执行 cl.exe 时出错.

0.obj - 1 error(s), 0 warning(s)
麻烦各位高手忙我看一下这究竟是什么问题啊!

搜索更多相关的解决方案: 编译  

----------------解决方案--------------------------------------------------------
把源程序帖出来
----------------解决方案--------------------------------------------------------
换个编译软件试试
----------------解决方案--------------------------------------------------------

最好把你的源程序贴出来


----------------解决方案--------------------------------------------------------
以下是引用秋阁在2006-12-11 13:06:32的发言:
换个编译软件试试

同意,建议用TC,GCC试试


----------------解决方案--------------------------------------------------------
LZ用的MS是C++这个就麻烦咯。。。
----------------解决方案--------------------------------------------------------
  相关解决方案