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

📄 代码.txt

📁 利用C++语言实现DOS界面下C++源程序的编译分析功能.
💻 TXT
字号:
#include <fstream>
#include <string>
#include <iostream>
#include <iomanip>
using namespace std;

char* keyword[]={"_asm", "auto", "bad_cast", "bad_typeid","bool",
                "break" ,"case" ,"catch","char","class",
                "const","const_cast","continue" ,"default" ,"delete" ,
                 "do","double", "dynamic_cast", "else", "enum",
				 "except" ,"explicit" ,"extern" ,"false","finally", 
				 "float", "for", "friend","goto", "if", 
				 "include","inline", "int","long", "mutable",
				 "namespace", "new","operator", "private", "protected",
				 "public","register", "reinterpret_cast", "return", "short",
				 "signed", "sizeof", "static", "static_cast","struct",
				 "switch", "template", "this","throw","true", 
				 "try", "type_info","typedef", "typeid", "typename", 
				 "union","unsigned", "using", "virtual","void",
				 "volatile", "while" 
};



int main (int)
{ 
 ifstream inf;
    inf.open("in.txt");
    ofstream outf;
    outf.open("out.txt");
    char c;
    inf >> noskipws;            
    while(inf >>c)
    {
        if (c == '\n'){            
            outf << "\n";        
            cout << "\n";    
        }
            
        else{                
            cout << c; 
			outf << c;           
        }
    }
    inf.close();
    outf.close();
    return 0;
}

⌨️ 快捷键说明

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