比这篇新的文章:
Codee#2613
比这篇旧的文章: Codee#2611
作者: , 点击78次, 评论(0), 收藏者(0), , 打分:
所有评论,共0条:( 我也来说两句)
比这篇旧的文章: Codee#2611
Codee#2612 编辑代码
语言: C++, 标签: 无 2009/07/02发布 8个月前更新 | 编辑代码作者: , 点击78次, 评论(0), 收藏者(0), , 打分:
C++语言: Codee#2612
01 //测试
02 #include<iostream>
03 using namespace std;
04
05 int main()
06 {
07 double d=10011111.000123;
08 int i=d;
09 int *t=(int *)&d;
10 double *b=(double *)t;
11 cout<<i<<endl;
12 cout<<*t<<endl;
13 cout<<*b<<endl;
14 return 0;
15 }
02 #include<iostream>
03 using namespace std;
04
05 int main()
06 {
07 double d=10011111.000123;
08 int i=d;
09 int *t=(int *)&d;
10 double *b=(double *)t;
11 cout<<i<<endl;
12 cout<<*t<<endl;
13 cout<<*b<<endl;
14 return 0;
15 }
所有评论,共0条:( 我也来说两句)
代码
