码迷,mamicode.com
首页 >  
搜索关键字:operator-    ( 3564个结果
string类 代码实例(转载)
//string函数用法详解!附代码,写具体的用法! #include #include #include using namespace std;int main(){ //1.string类重载运算符operator>>用于输入,同样重载运算符operator> str1;//当用cin...
分类:其他好文   时间:2015-01-01 14:46:18    阅读次数:183
无脑简单有暴力的AJAX。get访问API
写接口的话,无非就为了让移动端,WEB端,或者是PC Client调用。 我们写个返回JSON格式的接口,功能是关于四则运算。 header('Content-type:application/json'); $operator = $_GET['operator']; $first    = $_GET['first']; $second   = $_GET['second']; ...
分类:Windows程序   时间:2014-12-30 20:49:45    阅读次数:209
poj2431 Expedition
直接代码、、、#include#include#include#include#includeusing namespace std;struct node{ int fuel,dist; //bool operator d.dist; // }}s[10005];bool cmp(...
分类:其他好文   时间:2014-12-30 20:27:21    阅读次数:165
hdu_1005
1 #include 2 3 struct mat 4 { 5 int e[3][3]; 6 mat operator * (mat t){ 7 mat s; 8 for (int i = 1; i >=1;40 }41 ...
分类:其他好文   时间:2014-12-29 10:15:16    阅读次数:121
QDataStream 传递自定义的结构
QT自带的QDataStream只能传递它自己要求的数据类型。但是我们可以自己重载QDataStream& operator>();mydatastream.h 1 #ifndef MYDATASTREAM_H 2 #define MYDATASTREAM_H 3 4 #include 5 6...
分类:其他好文   时间:2014-12-28 23:36:13    阅读次数:488
Linux operator(often adding)
For myself to view:1.mount -t vboxsf E_DRIVE /mnt/shared2.tar xvzf arm-linux-gcc....tgz3.Add PATH export PATH=$PATH:/work/tools/... It is just for o.....
分类:系统相关   时间:2014-12-27 00:14:26    阅读次数:157
【C++】自定义比较函数小结
1、使用结构体grid作为map的keystruct grid{ int x; int y;};(1)需要自定义比较函数operator &,const std::deque &)”: 未能从“const grid”为“const std::deque &”推导 模板 参数 d:\mic...
分类:编程语言   时间:2014-12-26 21:31:00    阅读次数:442
STL使用sort注意的问题
结构体使用sort算法时,重载operator#include #include #include #include using namespace std;typedef struct SidInterface {SidInterface() {memset(this, 0, sizeof(Sid...
分类:其他好文   时间:2014-12-25 20:20:11    阅读次数:159
[Effective C++ --024]若所有参数皆需类型转换,请为此采用non-member函数
引言假设我们有这样的类:1 class A{2 public:3 A(int num = 0, int den = 1) {};4 int num() const;5 int den() const;6 const A operator* (const A& rhs)...
分类:编程语言   时间:2014-12-25 12:42:11    阅读次数:95
Effective STL--不同容器删除特定元素的方法
输入迭代器是每个迭代位置智能被读一次的只读迭代器。输出迭代器是每个迭代位置只能被写一次的只写迭代器。输入和输出迭代器被塑造为读和写输入和输出流。前向迭代器有输入和输出迭代器的能力,但是他们可以反复读或写一个位置。它们不支持operator--,所以他们可以高效地向前移动任意次数。所有的标准STL容器都支持比前向迭代器更强大的迭代器。散列容器是前向迭代器,单链表容器也提供前向迭代器   双向迭代...
分类:其他好文   时间:2014-12-25 11:21:29    阅读次数:143
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!