#include iostream
#include cstdlib
#include cctype //字符串判定
using namespace std;
const int MAX = 1024;
double operation(char *str);
char * extract(char *str, int index)
{
char *pstr(nullptr);//处理字符串
int num(0);//记录一下多少对括号
int bufindex(index);//记录下标
do
{
switch (*(str + index))
{
case ):
if (0 == num)
{
++index;
pstr = new char[index - bufindex];
if (!pstr)
{
throw malloc fail;
}
//拷贝字符串
strncpy_s(pstr, index - bufindex, str + bufindex, index - bufindex - 1);
return pstr;
}
else
{
num--;
}
break;
case (:
num++;
bre
您可能关注的文档
最近下载
- 新课标人教A版高一数学知识点总结.pdf VIP
- ACD200说明书.pdf
- 循证医学-循证医学绪论.pdf VIP
- 2026年生物技术期末复习-植物学(生物技术)历年题库含答案详解.docx VIP
- 高中生物模型建构教学的实践研究.docx VIP
- GB 1499钢筋新规范宣贯PPT.pdf VIP
- 2026年金属制品公司安全隐患排查治理管理制度.docx VIP
- 2026年河北省高考化学真题及答案.docx VIP
- 2025--2026学年广东省珠海市八年级下册期末考试数学试题 [含答案].docx VIP
- 机械制造技术课程设计-1-4档变速叉零件加工工艺规程及钻M10螺纹孔夹具设计.doc VIP
原创力文档

文档评论(0)