码迷,mamicode.com
首页 >  
搜索关键字:string    ( 95377个结果)
nupt1207(重数问题)
1.统计重数及次数。2.hash。%p,若冲突,则向后移动。******************************#include#include#includeusing namespace std;const int maxn=5000000;const int p=1200007;str...
分类:其他好文   时间:2014-06-09 22:34:07    阅读次数:211
C++中string类型对象和double型变量之间的互相转换
//convert string type value to double type value string s = "23"; double d; istringstream is(s); is>>d; cout<<d<<endl; //输出23 //convert double type .....
分类:编程语言   时间:2014-06-09 22:15:55    阅读次数:220
对C++ Primer的10.3.9单词转换的思考
#include #include #include #include #include using namespace std;ifstream& open_file(ifstream&,const string&);int main(int argc, char **argv){ map ...
分类:编程语言   时间:2014-06-09 00:04:20    阅读次数:334
Java对象的初始化
昨天写的代码被殷老师诟病了,因为太「丑陋」。原来我的代码结构是这样的:public class ColorRocognizer{ ..... public static void main(String args[]) { class ColorX { p...
分类:编程语言   时间:2014-06-08 23:39:43    阅读次数:296
IOS Swizzle(hook)
///////////////////////////////////////////////////////////////////////////////////////////////////#import "NSArray+swizzle.h"@implementation NSArray ...
分类:移动开发   时间:2014-06-08 22:41:02    阅读次数:372
java:I/O 一行一行读取和写入
BufferedReader逐行读取import java.io.*;class Test{ public static void main(String args []){ FileReader reader =null; BufferedReader buffe...
分类:编程语言   时间:2014-06-08 22:12:07    阅读次数:434
泛型,动态创建List<T> (转摘)
第一种: static void Main() { object intList = MakeList(typeof(int), 1, 2, 3); object strList = MakeList(typeof(string), "sdfd", "fet"); //List foreach(o....
分类:其他好文   时间:2014-06-08 21:25:32    阅读次数:336
简单排序poj2388
#include #include #include #include using namespace std;int cmp(const void *a,const void *b){ return *(int *)a-*(int *)b;}int main(){ int n; ...
分类:其他好文   时间:2014-06-08 20:51:16    阅读次数:202
Swift语言指南(四)--类型安全和类型推断
Swift是一门类型安全语言,类型安全语言需要代码里值的类型非常明确。如果你的代码中有部分值需要String类型,你就不能错误地传递Int。鉴于Swift的类型安全,编译代码时,Swift会执行类型检查并将任何类型不匹配的地方标记为错误,使你在开发当中尽可能早的捕获并修正错误。类型检查有助于你在操作...
分类:其他好文   时间:2014-06-08 20:48:43    阅读次数:245
poj3278
数组必须开大点#include #include #include #include using namespace std;struct node{ int x,ans;}q[1000005];int jx[]={-1,1};int n,k;int map[1000005],v[100000...
分类:其他好文   时间:2014-06-08 20:48:03    阅读次数:319
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!