摘要: #include <iostream>using namespace std;int main(void){ char *pp = "abc";//*pp指向的是字符串中的第一个字符。 char p[] = "abc"; //p++;//不允许改变p的值 //pp++;//true; //p[0] = 'A';//true //pp[0] = 'A';//false,运行时写错误 cout << pp<<endl; // 返回pp地址开始的字符串:abc cout << p& 阅读全文
posted @ 2013-06-17 16:47 xiaowenchao 阅读(927) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>int partition(int (&a)[11],int low,int high){ a[0] = a[low]; int pivotkey = a[low]; while(low<high) { while (low<high && a[high]>=pivotkey) { --high; } a[low] = a[high]; while (low<high && a[low]<=pivotkey) { ++low; } a[high] = a[low]; } a[l 阅读全文
posted @ 2013-06-17 16:15 xiaowenchao 阅读(231) 评论(0) 推荐(0) 编辑