![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 80
wang19891106
这个作者很懒,什么都没留下…
展开
-
C字符串和标准的C++string类
一、C字符串c字符串是char类型的数组。char str[MAX]1.在c++中并没有内置的机制保证程序不会出现数组元素个数超出数组大小的情况。cout2.cin.get():来读取包含空格的文本。这样的语法表示stream类的成员函数get(),而cin是这个类的对象。cin.get()的第一个参数是存放输入字符串的数组地址; 第二个转载 2012-09-19 20:28:47 · 741 阅读 · 0 评论 -
C++ 四则运算表达式(简单的+-*/带括号) 栈
#include #include #include #include using namespace std;//将中缀表达式转换为后缀表达式string InfixToPostfix(string &str){ map priority; priority['+'] = 0; priority['-'] = 0; priority['*'] = 1;原创 2012-10-28 20:55:02 · 1893 阅读 · 0 评论