数据文件模式匹配算法? [英] Data file pattern matching algorithm?

查看:98
本文介绍了数据文件模式匹配算法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个整数形式的数据文件,然后想用模式匹配来匹配这个数据文件,想在这两个文件中显示共同的数据.我需要C或C ++代码.

Im having two data files in the format of integer,then want to match this data files using pattern matching,want to display common data in that two files.I need the C or C++ code.

FILE *datafile1;
datafile1 = fopen( "c:\\pw1.txt", "r" );
float fFiledata;
int nCount = 0;
int nLatitude[ 600 ];
int nLongitude[ 600 ];
float fHeight[ 600 ];
FILE *datafile1;
fscanf(datafile1,"%f",&fFiledata );
datafile2 = fopen( "c:\\pw2.txt", "r" );
float fFiledata;
int mCount = 0;
int mLatitude[ 600 ];
int mLongitude[ 600 ];
float fHeight2[ 600 ];
fscanf(datafile2,"%f",&fFiledata );


之后,如何匹配此文件以找到公共数据并存储在另一个文件中,即datafile3?


after that how to match this files find common data and store in another file ie datafile3?

推荐答案

,您的问题到底是什么?你困在哪里?请问一个特定的问题,而不要输入完整的代码.
And what is your problem exactly ? Where are you stuck ? Please ask a specific question, not asking for the full code.


这篇关于数据文件模式匹配算法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆