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

📄 dialog2.cpp

📁 实现了简单的Simple语言的编辑器,包括词法分析,语法分析,生成四元式,以及生成符号表功能,在符号表中还可以进行查询与删除.
💻 CPP
字号:
// Dialog2.cpp : implementation file
//

#include "stdafx.h"
#include "caoyuting.h"
#include "Dialog2.h"
#include "Dialog3.h"
#include "Dialog1.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CCaoyutingApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CDialog2 dialog


CDialog2::CDialog2(CWnd* pParent /*=NULL*/)
	: CDialog(CDialog2::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDialog2)
	m_name = _T("");
	//}}AFX_DATA_INIT
}


void CDialog2::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDialog2)
	DDX_Text(pDX, IDC_EDIT1, m_name);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDialog2, CDialog)
	//{{AFX_MSG_MAP(CDialog2)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDialog2 message handlers

void CDialog2::OnButton1() 
{
	// TODO: Add your control notification handler code here
    bool i=false;	
    UpdateData(true);
	for(int j=0;j<theApp.n;j++)
    if (m_name==theApp.nam[j])
	{  
	  i=true;
	  theApp.str1=theApp.str[j];
	}

	if(i==true)
	{
	  CDialog3 dialog3;
	  dialog3.DoModal();
	} 
	else
	{
	    CDialog1 dialog1;
        dialog1.m_cOut.AddString(m_name);
 
	}
	CDialog2::OnOK();
	
	}

⌨️ 快捷键说明

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