main.cpp

来自「简单的模拟DNA配对的程序」· C++ 代码 · 共 47 行

CPP
47
字号
#include <iostream>#include <fstream>using namespace std;#include "dna.h"int main(){	const int FMAX = 30;	char FileName[FMAX];	ifstream ins;	ofstream outs;		cout << endl << " Enter filename to read: ";	cin >> FileName;			ins.open(FileName, ios::in);		if(ins.good())	{		cout << " File Opened: " << FileName << endl;		reverse(ins);	}	else		cout << " File can not be opened for reading - exiting. " << endl;	ins.close();	cout << endl;	cout << endl << " Enter filename to write: ";	cin >> FileName;	outs.open(FileName, ios::out);		if(outs.good())	{		cout << " File Opened: " << FileName << endl;		save(outs);	}	else		cout << " File can not be opened for writing - exiting. " << endl;	outs.close();	return 0;}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?