码迷,mamicode.com
首页 >  
搜索关键字:const char p    ( 57984个结果
Java oop总结一
一、 对象 1. 属性 1) 属性 a) 数据类型 基本数据类型:整型(byte、short、int、long),浮点型(float、double)、字符型(char)、布尔型(boolean)。 引用数据类型:自定义类型、数组、接口。 2) 方法 a) 方...
分类:编程语言   时间:2014-05-15 16:45:41    阅读次数:374
C语言的时间函数
---恢复内容开始---下面是C语言的获取本地时间和构造时间进行格式化时间显示输出的相关函数:This page is part of release 3.35 of the Linux man-pages project.#include char *asctime(const...
分类:编程语言   时间:2014-05-15 16:40:30    阅读次数:300
杭电2025
1 #include 2 #include 3 using namespace std; 4 5 int main() 6 { 7 string str=""; 8 string str2=""; 9 char max;10 while (getline(ci...
分类:其他好文   时间:2014-05-15 16:20:41    阅读次数:258
如何在引号里面引用宏
#include #include #define MY_STR_LEN 32 #define __MY_FMT_STR(LEN) "%"#LEN"s" #define MY_FMT_STR(LEN) __MY_FMT_STR(LEN) int _tmain(int argc, _TCHAR* argv[]) { char* input = "0123456789abcdef01234...
分类:其他好文   时间:2014-05-15 07:18:11    阅读次数:313
C++ Primer 学习笔记_70_面向对象编程 --纯虚函数、容器与继承
面向对象编程--纯虚函数、容器与继承I.纯虚函数 在函数形参后面写上 =0 以指定纯虚函数:class Disc_item : public Item_base { public: double net_price(size_t) const = 0; //指定纯虚函数 }; 将函数定义为纯虚函数能够说明,该函数为后代类型提供了可以覆盖的接口,但是这个类的版本绝不会调用。重要的是,用户将不...
分类:编程语言   时间:2014-05-15 05:50:43    阅读次数:316
备忘之 拷贝构造函数
//拷贝构造函数,什么时候算是 “合适的时候”,才会合成呢~~~ #include using namespace std; class A { public:     A(char *_str):str(_str),x(0){}     //A(const A&a){cout     //如果没有定义的话,对于类A来说,编译器依然不会合成,因为此时的对象之间的...
分类:其他好文   时间:2014-05-15 05:11:13    阅读次数:334
UVa 10308 Roads in the North 树的直径
题目来源:UVa 10308 Roads in the North 题意:求距离最远的2点之间的距离 思路:裸的树的直径 或者树形DP #include #include #include using namespace std; const int maxn = 100010; struct node { int to, w; node(){} node(int to, int...
分类:其他好文   时间:2014-05-15 03:37:18    阅读次数:295
HDU--2846--Repository--字典树
#include #include #include #include #include #include using namespace std; struct ssss { ssss *c[26]; int n,v; }*s; void insert(char *str,int v) { int i,j,k,l; ssss *p,*q; p=...
分类:其他好文   时间:2014-05-14 15:06:54    阅读次数:357
从select的一个死循环谈epoll的ET模式
最近写程序遇到一个问题,就是发现select监听标准输出的时候遇到了死循环,具体程序如下程序一。程序的意图是每当用户在控制台有任何输入,就输出”hello world!”。 程序一: #include  #include  #include  #include  int  main(int argc, char *argv[]) { ...
分类:其他好文   时间:2014-05-14 14:46:25    阅读次数:250
String构造器中originalValue.length>size 发生的情况
最近在看Jdk6中String的源码的时候发现String的有个这样的构造方法,源代码内容如下:public String(String original) { int size = original.count; char[] originalValue = original.value; cha...
分类:其他好文   时间:2014-05-14 11:34:24    阅读次数:274
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!