摘要:
A landing by Japanese activists Sunday on an island claimed by Japan, China and Taiwan sparked anti-Japanese protests across China, as tensions continued to rise in a pair of territorial spats roiling relations in East Asia.territorial:领土的,地方的,区域的 spat:争吵,口角 The flare-ups are also adding to the ... 阅读全文
posted @ 2012-08-21 16:56
微雪
阅读(274)
评论(0)
推荐(0)
摘要:
C++ STL Adaptor stack、queue和vector的使用1.Stacktop()返回栈顶元素,并不移除这个元素empty()如果栈空返回true,否则falsesize()栈的大小void push()插入元素到栈顶void pop()移除栈顶元素#include<iostream>#include<stack>using namespace std;void main(){stack<char> v;for(int i=0;i<10;i++)v.push(i+97);cout<<v.size()<<endl; 阅读全文
posted @ 2012-08-21 10:21
微雪
阅读(13643)
评论(0)
推荐(0)
摘要:
warning C4018: “<”: 有符号/无符号不匹配 出错代码 for(int j=0;j<detector.size();j++)出错原因分析: detector 是一个Vector容器 ,detecot.size() 在容器说明中 被定义为: unsigned int 类型, 而j是int 类型 所以会出现: 有符号/无符号不匹配 警告 错误改正 : 定义j为unsigned 类型后就可以了 即: for(unsigned int j=0;j<detector.size();j++) 阅读全文
posted @ 2012-08-21 09:46
微雪
阅读(380)
评论(0)
推荐(0)

浙公网安备 33010602011771号