利用MFC在控件内将txt中的数据画图

1:采集txt文件中的数据测试程序如下:

#include "stdafx.h"
#include <fstream>
#include "iostream"
using namespace std;
int main(int argc, char* argv[])
{
    FILE *fp;
    float j;
    fp=fopen("c1_p1_x.txt","r");
    for(int i=1;i<=105;i++)
    {
        fscanf(fp,"%f",&j);

        cout<<j<<endl;
    }

    fclose(fp);
    return 0;
}
View Code
原文地址:https://www.cnblogs.com/lovemi93/p/7224319.html