![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C/C++
文章平均质量分 69
m_scorpio
这个作者很懒,什么都没留下…
展开
-
单链表表示多项式ADT&多项式加法
//多项式ADT//利用单链表实现//要求:输入顺序必须按照从指数的大小,由大到小//如:7x^3+4x^2+1//想要结束该次多项式输入,请在下一项输入 0 -1#include#includetypedef struct node *ptrNode;#define Len sizeof(struct node)struct node{ int coefficient;原创 2015-04-11 14:37:06 · 757 阅读 · 0 评论 -
warning C4552: “>>”: 运算符不起任何作用;应输入带副作用的运算符
转自:http://www.letuknowit.com/topics/20111124/warning-c4552.html/今天在写一个小程序的时候,需要用到移位操作,可谁想竟然给弄出来个warning C4552,具体错误如下:“warning C4552: “>>”: 运算符不起任何作用;应输入带副作用的运算符”检查了下代码,原来是自己疏忽导致的,我的代转载 2015-04-09 20:36:34 · 16629 阅读 · 0 评论 -
double转int精度丢失问题
在做学校的acm题时遇到这么一个问题,多余部分已省去,问题部分为:输入正整数n,取2的n次方的最高位。由M=2^n,两边取以10为底的对数,logM=nlog2=y则pow(10,y的小数部分)即为所求。于是有如下代码:#include #include #include using namespace std;int high(long long int原创 2015-05-10 18:19:45 · 5741 阅读 · 0 评论