10进制转2,8进制解决方法
10进制转2,8进制
error C2660: 'to_binary' : function does not take 1 parameters
执行 cl.exe 时出错.
1.obj - 1 error(s), 0 warning(s)
------解决方案--------------------
错误报告不已经说了
to_binary(n/c); 几个参数
- C/C++ code
#include<stdio.h> void to_binary(unsigned long n,unsigned int); int main(void) { unsigned long number; unsigned int m; printf("Enter an integer(q to quit):\n"); while(scanf("%ul%d",&number,&m)==1) { printf("Binary equivalent:"); to_binary(number,m); putchar('\n'); printf("Enter an integer(q to quit):\n"); } printf("Done!\n"); return 0; } void to_binary(unsigned long n,unsigned int c) { int r; r=n%c; if(n>=c) to_binary(n/c); putchar('0'+r); return; }
error C2660: 'to_binary' : function does not take 1 parameters
执行 cl.exe 时出错.
1.obj - 1 error(s), 0 warning(s)
------解决方案--------------------
错误报告不已经说了
to_binary(n/c); 几个参数