| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 978 人关注过本帖
标题:求大神 代码 如何自定义函数写出分行提取代码
只看楼主 加入收藏
yuanda199312
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2018-4-12
结帖率:50%
收藏
 问题点数:0 回复次数:0 
求大神 代码 如何自定义函数写出分行提取代码
// ConsoleApplication1.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <math.h>




int main()
{
    FILE    *stream, *stream2;


    double output,n,s;
   
   
    errno_t    err;
    err = fopen_s(&stream, "D://input.dat.txt", "r" );
        if(    err    ==    0    )   
        {    printf(    "The    file    myFile.dat    was    opened\n"    );    }
        else   
        { printf(    "The    file    myFile.dat    wasn’t    opened\n"    );    }

        output = fscanf_s(stream, "%lf %lf", &n,&s);
        
        while (output != EOF) {

            printf_s("%f %f\n", n, s);
            output = fscanf_s(stream, "%lf %lf", &n, &s);

            
        }
        
        
        
        
        
            int numclosed = _fcloseall();  
            printf("Number of files closed by _fcloseall:    %u\n", numclosed);
   
        return 0;
}

求自定义函数写出n,s的单独一行的值,进行验证然后取出下一行n,s的值 在进行验证
搜索更多相关主题的帖子: 代码 自定义 函数 the output 
2018-04-12 11:40
快速回复:求大神 代码 如何自定义函数写出分行提取代码
数据加载中...
 
   



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

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