⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 souce.h

📁 小型编译器的课程设计实例哦 值得一看的
💻 H
字号:
#include<iostream.h>
#include<fstream.h>
#include<stdlib.h>
#include"String.h"

#ifndef SOUCE_CLASS
#define SOUCE_CLASS

class Souce
{//字符表生成类
	
public:
	Souce()
	{//从文件中读取字符标准矩阵
		ifstream fin;
		fin.open("xu.txt",ios::in);
		if(!fin)
		{
			cerr<<"The data file can't be opened!"<<endl;
			exit(1);
		}

		fin>>N;
	    souce=new String[N];
		for(int i=0; i<N;i++)
				fin>>souce[i];
		fin.close();
		for(i=0;i<N;i++)
				cout<<souce[i]<<"  "<<i<<"  \t ";
		cout<<endl;
	}


	String *souce;
	int N;
};

#endif

⌨️ 快捷键说明

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