题意:给出n个字符串,问每个字符串有多少个子串至少出现在z...
分类:
其他好文 时间:
2014-08-17 09:11:42
阅读次数:
224
求变量的数据类型,通过函数typeid(变量名).name();获得变量的数据类型。
案例如下:
#include
#include
void
main()
{
double
db = 10.9;
double *pdb
= &db;
auto
num =
pdb;
//...
分类:
编程语言 时间:
2014-08-17 02:36:51
阅读次数:
402
八进制、十六进制字符 1 #include 2 3 int main(void) 4 { 5 int a = '\101'; 6 int b = '\0101'; // 错误 7 int c = '\x41'; 8 int d = '\X41'; ...
分类:
其他好文 时间:
2014-08-17 02:27:51
阅读次数:
234
一.Linux系统根文件详解Linux的重要哲学思想其实就是:将程序的配置文件保存为纯文本格式。1./boot:系统启动文件,如:内核文件,iniyrd以及gurb(bootloarder)2./dev:目录下为设备文件,设备文件又分为块设备和字符设备:块设备:按数据块随机访问,没有顺序。字符设备:线性..
分类:
系统相关 时间:
2014-08-17 01:12:51
阅读次数:
334
1、引用内部函数绑定机制
#include
#include
using
namespace
std;
using
namespace
std::placeholders;
//仿函数,创建一个函数指针,引用一个结构体内部或者一个类内部的共有函数
struct
MyStruct
{
void...
分类:
编程语言 时间:
2014-08-17 01:07:51
阅读次数:
473
??
使用C++风格的数组,不需要管理内存。
array要注意不要溢出,因为它是栈上开辟内存.
array适用于任何类型
#include
#include
#include
//C++的标准库
#include
//C++字符串
#include
using
std::array;
//...
分类:
编程语言 时间:
2014-08-17 01:06:51
阅读次数:
342
字符型常量视为int类型 1 #include 2 3 int main(void) 4 { 5 int a = 'ABCD'; 6 int b = 'XYABCD'; 7 printf("%d %c\n", a, a); 8 printf("%d...
分类:
其他好文 时间:
2014-08-17 01:05:11
阅读次数:
150
#include #include #include #include using namespace std;void StringSplit(const string& str,vector& vStr,const char& division){ int startPos = 0; int e...
分类:
其他好文 时间:
2014-08-17 00:57:21
阅读次数:
345
Mysql数据类型分为:整数类型、浮点数类型、定点数类型日期与时间类型字符串类型二进制类型整数类型 字节数 无符号数取值范围 有符号数取值范围TINYINT 1 0-255 -128-127SMALLINT 2 ...
分类:
数据库 时间:
2014-08-16 23:44:31
阅读次数:
297
1. 声明字符串String s = "abcd";这里,s存储了“abcd”在这个字符串对象的引用,如下图所示:2. 将字符串变量s赋值给字符串变量s2String s2 = s;此时,s2也指向了“abcd”。3. 字符串合并s = s.concat("ef);这里,明显是新创建了字符串对象“a...
分类:
编程语言 时间:
2014-08-16 23:43:31
阅读次数:
333