| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 362 人关注过本帖
标题:求大神指点编译完后,没有报错,为什么不可以运行
取消只看楼主 加入收藏
jinye111
Rank: 1
等 级:新手上路
帖 子:16
专家分:3
注 册:2012-11-15
结帖率:57.14%
收藏
 问题点数:0 回复次数:0 
求大神指点编译完后,没有报错,为什么不可以运行
程序代码:
#include<stdio.h>
void copy_arr(double[],double[],int);
void copy_ptr(double*,double*,int);
int main()
{
    double source[5]={1.1,2.2,3.3,4.4,5.5};
    double target1[5],target2[5];
    int i;
    copy_arr(source,target1,5);
    copy_ptr(source,target2,5);
    for(i=0;i<5;i++)
        printf("%lf,%lf\n",target1[i],target2[i]);
    return 0;
}
void copy_arr(double source[],double target[],int numbers)
{
    int i;
    for(i=0;i<numbers;i++)
        target[i]=source[i];
}
void copy_ptr(double*source,double*target,int numbers)
{
    int i;
    for(i=0;i<numbers;i++)
        *(target+i)=*(source+i);
}
搜索更多相关主题的帖子: color 
2013-10-26 10:15
快速回复:求大神指点编译完后,没有报错,为什么不可以运行
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.011877 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved