应用场景: 在内存中维持一个有序的vector: 1 // VectorSort.cpp : Defines the entry point for the console application. 2 3 #include 4 #include 5 #include 6 7 //先自定...
分类:
编程语言 时间:
2015-07-08 20:37:35
阅读次数:
199
可能导致Cannot redeclare class CLassName错误的原因:1.在同一个文件中重复声明了两次同名的类:class Extend {}class Extend {}new Extend();这时候就会报错。2.多次包含相同文件。这个可以试用include_once解决3.该类为...
分类:
Web程序 时间:
2015-07-08 20:21:35
阅读次数:
164
shell脚本利用Here Document ,打包C的源码并编译生成再执行。 shell携代攻击程序? cat 1.sh
#!/bin/bash
#
echo "正在产生 hello.c ... "
echo
cat <<‘EOF‘ > hello.c
#include<stdio.h>
int main()
{
printf(...
分类:
系统相关 时间:
2015-07-08 19:16:32
阅读次数:
191
输入一组整数,求出最大子序列的和.
例如:序列: - 2 11 - 4 13 - 5 - 2,则最大子序列和为20。
序列: - 6 2 4 - 7 5 3 2 - 1 6 - 9 10 - 2,则最大子序列和为16
遍历是一种方法:
#include
int Max_Son(int *p, int len)
{
int Max_Sum = 0;
i...
分类:
编程语言 时间:
2015-07-08 19:07:24
阅读次数:
102
#include
#include
#include
#include
#include #define MAX_STRING 100
#define EXP_TABLE_SIZE 1000
#define MAX_EXP 6
#define MAX_SENTENCE_LENGTH 1000
#d...
分类:
其他好文 时间:
2015-07-08 19:04:55
阅读次数:
252
题目要求很简单,给两个字符串,第一个字符串中有'’的符号,整个字符串可以分为s1s3s5。第二个字符串中结尾是'...'。要求输出两个字符串,一个是将第一个字符串中的''去掉,另一个是在第二个字符串后面加上s4s3s2s5。直接模拟即可。
#include
#include
#include
#include
using namespace std;
int main()
{
int n,l1...
分类:
其他好文 时间:
2015-07-08 18:56:35
阅读次数:
124
为了做一个东西需要用到动态创建二维数组,特此记录.
#include
#include "time.h"
using namespace std;
int main()
{
srand((unsigned)time(NULL));
int x_num;
int y_num;
cout<>x_num;
cout<<"p...
分类:
编程语言 时间:
2015-07-08 18:54:57
阅读次数:
104
#include #define COL 6#define ROW 6int main(int argc, const char * argv[]) { //****** 定义变量 ********** //1、定义变量,地图、存储用户输入的方向、小人的位...
分类:
其他好文 时间:
2015-07-08 18:48:34
阅读次数:
127
1 /* 2 * Copyright (C) 2012 Freescale Semiconductor, Inc. 3 * 4 * Configuration settings for the MX6Q Sabre Lite2 Freescale board. 5 * 6 *...
分类:
其他好文 时间:
2015-07-08 18:43:19
阅读次数:
129
#include #include #include using namespace std;struct person{ int data; int id;};int l[1001],r[1001];//存储编号为i的左边的编号和右边的编号int data[1001];//存储编号为i...
分类:
编程语言 时间:
2015-07-08 18:42:37
阅读次数:
126