病毒感染检测

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Dian0dian0/article/details/86651154
#include <iostream>
#include <fstream>
#include<bits/stdc++.h> 
#include <stdio.h>  
#include <stdlib.h>    
#include <sstream>  
#include <String>  
using namespace std;
class initial 
{
	
	public:
		int next[10];//用来标记的next数组  
		int num ;
        int len1,len2;  
        char string1[10];
		char string2[20];//默认病毒的最大长度为
        fstream  ffile,ffileout;
        string str, line; 
		
	public:
	    	
		string kmp(int len1,int len2)  ;
		void getnext(int len)  ;
		void open_file() ;
		void close_file();
		void  file_read();
		int  lengthofstring();
				
};
void   DNA_CHECK::open_file( )
{
	ffile.open( "file.txt",ios::in ) ;
	ffileout.open("result.txt",ios::out);
	if( !ffile||!ffileout)  //以输入的方式打开文件 ,在当前路径下创建了DNA.txt文本文件! 
	  cout<<"open error! please verify that  you enter the correct path?"<<endl;
    else 
      cout<<"--------------open successful!------------------------"<<endl;  
 } 

猜你喜欢

转载自blog.csdn.net/Dian0dian0/article/details/86651154