转自:http://www.cnblogs.com/kaituorensheng/p/3477630.html 1. 类成员为const类型 2. 类成员为引用类型 #include <iostream> using namespace std; class A { public: A(int &v
分类:
编程语言 时间:
2016-02-25 15:34:25
阅读次数:
189
何为小头序? #include<iostream> #include<stdio.h> using namespace std; int main() { FILE*file = fopen("haha.txt", "wb"); short x = 256; fwrite(&x, sizeof(x)
分类:
其他好文 时间:
2016-02-25 15:25:29
阅读次数:
128
Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space? 思路:笨办法是每一个节点再开辟一个属性存放是否訪问过,这样遍历一遍就可以知道是
分类:
编程语言 时间:
2016-02-25 15:18:32
阅读次数:
170
(~ ̄▽ ̄)~* //既然是求最少能胜几次 //说明对方是要尽可能让我输 //但为了避免浪费,对方会用比我的牌大的牌中的最小pip的牌来击败我 #include #include #include #include using namespace std; int main() { int Cas=...
分类:
其他好文 时间:
2016-02-25 13:49:53
阅读次数:
169
(~ ̄▽ ̄)~* #include #include #include using namespace std; const int MAXN=100005; char s[MAXN]; int main() { int n; scanf("%d",&n); scanf("%s",s);//输入01...
分类:
其他好文 时间:
2016-02-25 13:41:38
阅读次数:
150
( ̄▽ ̄)" #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; const int ...
分类:
其他好文 时间:
2016-02-25 13:41:31
阅读次数:
196
通过c++字符串string实现大数的加、减、乘、除 1 #include <iostream> 3 #include <cstdlib> 4 #include <vector> 6 #include <sstream> 7 #include <algorithm> 9 using namespac
分类:
编程语言 时间:
2016-02-25 13:37:08
阅读次数:
255
MySQL创建新用户后无法登录,提示 Access denied for user 'username'@'localhost' (using password: YES) ,多半是因为存在匿名用户,要解决这个问题只要删除数据库中的匿名用户即可。 MySQL新建用户后无法登录,提示 Access d
分类:
数据库 时间:
2016-02-25 13:31:51
阅读次数:
252
namespace ConsoleApplication2 { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; using System.
分类:
数据库 时间:
2016-02-25 11:41:46
阅读次数:
262
1. 内存分配: C++里面使用new delete 注意: #include <iostream> #include"stdlib.h" using namespace std; int main(int argc, char *argv[]) { int* p=new int(5); //申请了
分类:
编程语言 时间:
2016-02-25 11:40:24
阅读次数:
203