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

📄 scstring.cpp

📁 一个经典的词法分析器
💻 CPP
字号:
#include "afxwin.h"
#include "EMBSQL.h"

//
// Allocate a string object in shared memory
void *SCString::operator new(size_t size)
{
	return shared_malloc(size);
}

//
// Deallocate a string object in shared memory
void SCString::operator delete(void *ptr)
{
	shared_free((char *)ptr);
}

//
// Construct the string object
SCString::SCString(CString nm)
{
	value = shared_malloc(nm.GetLength()+1);
	strcpy(value,(LPCSTR)nm);
}

//
// Destroy the string object
SCString::~SCString()
{
	shared_free(value);
}

//
// Return the value of the string object in shared memory as a CString
CString SCString::Value()
{
	return CString(value);
}

⌨️ 快捷键说明

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