|
![]() | 作者: nzwj [nzwj]
![]() |
登录 |
本帖由 [嘶风] 从 << 网吧专题>> 转移而来main() {char c; do {printf("exit enter '0', 16 to 10 enter '1',10 to 16 enter '2'\n"); switch(scanf("%c",&c)) {case '1' :xtod(); break; case '2' :dtox(); break; default :printf("error"); } }while(c=='0'); } xtod() { int a,b,c; printf("please enter 3 16mod,between its is ',' num.\n"); scanf("%x,%x,%x",&a,&b,&c); printf("%d,%d,%d",a,b,c); } dtox() { int a,b,c; printf("please enter 3 10mod num.,between its is','\n"); scanf("%d,%d,%d",&a,&b,&c); ptintf("%x,%x,%x",&a,&b,&c); } 是为了把10 16进制相互转化,主要用于转化颜色的不同表示方法 但编译后不能运行提示,无法连接 用的是tc |
地主 发表时间: 05-03-25 14:45 |
![]() | 回复: ggf1230 [ggf1230] ![]() |
登录 |
你的xtod();dtox();两个函数是那个库数里的啊?在你的程序最上面#调用那个库函数. |
B1层 发表时间: 05-03-28 22:05 |
![]() | 回复: newmyself [newmyself] ![]() |
登录 |
你的两个子函数是不是在main()函数之前没有定义啊? |
B2层 发表时间: 05-04-10 14:21 |
![]() | 回复: apollomz [apollomz] ![]() |
登录 |
加上头文件指向了。 #include<math.h> |
B3层 发表时间: 05-04-10 20:25 |
![]() | 回复: nzwj [nzwj] ![]() |
登录 |
那不是库函数呀,是 自定义的 能调用,但10进制转化为16进制时,输出结果是错的 |
B4层 发表时间: 05-04-17 15:52 |
![]() | 回复: kevin789 [kevin789] ![]() |
登录 |
恩 上面的说的有道理呀 坛中央灌水办 |
B5层 发表时间: 05-04-17 17:37 |
![]() | 回复: shihaiyun [shihaiyun] ![]() |
登录 |
函数声明![]() |
B6层 发表时间: 05-04-18 08:50 |
![]() | 回复: xxing [xxing] ![]() |
登录 |
是啊,没有申明要调用函数 |
B7层 发表时间: 05-04-18 16:30 |
|
20CN网络安全小组版权所有
Copyright © 2000-2010 20CN Security Group. All Rights Reserved.
论坛程序编写:NetDemon
粤ICP备05087286号