main.cpp
上传用户:jiashang
上传日期:2013-07-26
资源大小:12k
文件大小:1k
源码类别:

文本生成

开发平台:

Visual C++

  1. #include <iostream.h>
  2. //#include <stdio.h>
  3. //#include <stdlib.h>
  4. #include "class1.h"
  5. ///////////////////////////////////////////////////////////////////////
  6. void main()
  7. {
  8. cout<<" ++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
  9.     cout<<" 词法分析器"<<endl;
  10.     cout<<" ++++++++++++++++++++++++++++++++++++++++++++++++"<<endl;
  11. ///////////////////////////////////////////////////////////
  12. char fileName[20];
  13. ofstream outFile;
  14.     if( OpenFile(fileName)==true)
  15. { while (cch!=EOF)
  16.    {
  17.    GetNextWord();
  18.        cout<<endl;
  19.    
  20.    }
  21. }
  22. else 
  23. cerr<<"文件不能打开!"<<endl;
  24.    
  25. // CloseFile(fileName);
  26.   //cout<<"程序已完成词法分析,分析结果已经存储在文件"<<"中!!!n";//<<file_name
  27. }