hereiszephyrus / mycoding Goto Github PK
View Code? Open in Web Editor NEWCUG小萌新个人代码垃圾堆
CUG小萌新个人代码垃圾堆
Hihi!欢迎你通过GitHub与我交流,我相信这会是一个高效的沟通方法,为了更好更方便的交流,以下要求请你阅读:
开源是一件十分美好的事情,是一个维护者与贡献者相互学习的过程,各处不完善请各位多多包涵!
Channing Tong
2023.4.6
#endif // !_HAS_CXX20
_CONSTEXPR20 void _Compat(const _String_const_iterator& _Right) const noexcept {
// test for compatible iterator pair
#if _ITERATOR_DEBUG_LEVEL >= 1
_STL_VERIFY(this->_Getcont() == _Right._Getcont(), "string iterators incompatible (e.g."
" point to different string instances)");
#else // ^^^ _ITERATOR_DEBUG_LEVEL >= 1 ^^^ // vvv _ITERATOR_DEBUG_LEVEL == 0 vvv
(void) _Right;
#endif // _ITERATOR_DEBUG_LEVEL
}
#if _ITERATOR_DEBUG_LEVEL >= 1
friend _CONSTEXPR20 void _Verify_range(
const _String_const_iterator& _First, const _String_const_iterator& _Last) noexcept {
_STL_VERIFY(_First._Getcont() == _Last._Getcont(), "string iterators in range are from different containers");
_STL_VERIFY(_First._Ptr <= _Last._Ptr, "string iterator range transposed");
}
#if _ITERATOR_DEBUG_LEVEL >= 1
_Verify_offset(_Off);
#endif // _ITERATOR_DEBUG_LEVEL >= 1
_Ptr += _Off;
return *this;
}
_NODISCARD _CONSTEXPR20 _String_const_iterator operator+(const difference_type _Off) const noexcept {
_String_const_iterator _Tmp = *this;
_Tmp += _Off;
return _Tmp;
}
_NODISCARD_FRIEND _CONSTEXPR20 _String_const_iterator operator+(
const difference_type _Off, _String_const_iterator _Next) noexcept {
_Next += _Off;
return _Next;
}
_CONSTEXPR20 _String_const_iterator& operator-=(const difference_type _Off) noexcept {
return *this += -_Off;
}
_NODISCARD _CONSTEXPR20 _String_const_iterator operator-(const difference_type _Off) const noexcept {
_String_const_iterator _Tmp = *this;
_Tmp -= _Off;
return _Tmp;
}
_NODISCARD _CONSTEXPR20 difference_type operator-(const _String_const_iterator& _Right) const noexcept {
_Compat(_Right);
return _Ptr - _Right._Ptr;
}
_NODISCARD _CONSTEXPR20 reference operator[](const difference_type _Off) const noexcept {
return *(*this + _Off);
}
_NODISCARD _CONSTEXPR20 bool operator==(const _String_const_iterator& _Right) const noexcept {
_Compat(_Right);
return _Ptr == _Right._Ptr;
}
if (p == '-' || p == '+') {
if (p == Expr.begin() || (!Back_Bracket((p - 1)) && ((p - 1) != '!') && (*(p - 1) < '0' || *(p - 1) > '9'))) {
//若不是后括号或幂或数字则不是合法双目运算符
if (*p == '-') flag = -1;
if (*p == '+') flag = 1;
p++;
// cout<<"flag"<<endl;
// system("pause");
continue;
}
}
int main() {
cin >> Expr;
while (!(Expr.length() == 1 && Expr[0] == '0')) {
Expr = '(' + Expr + ')';//在表达式两端加上括号用于简化处理
if (!Valid(Expr))
cout << "It is not a valid expression!" << endl;
else
cout << Solve(Expr) << endl;//求解运算符
cin >> Expr;
}
cin.get();
cin.get();
return 0;
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.