这是我的函数,编译器提示的错误是error C2371: 'a' : redefinition; different basic typesdouble a( double x, char y ){ switch( y ){ case 'a': return ( x * 2.0 ); case 'b': return ( x * 1.5 ); case 'c': return ( x * 1.0 ); }}
是不是你之歌函数没有返回值啊,你是用double声明的函数。。但是我的没有错啊。。只是警告了。你在最后试试加上return;