![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
Chris_Paul_CSU
这个作者很懒,什么都没留下…
展开
-
简易的冒泡排序
void Bubble(int a[], int n) { int temp = 0; for (int i = 1; i != n; ++i) for (int j = 0; j != n - i; ++j) if (a[j] > a[j + 1]) { temp = a[j];原创 2014-10-28 23:34:11 · 394 阅读 · 0 评论 -
C++ Primer(第五版) 练习12.6
小弟刚学C++, 恳请指教。。。。原创 2014-10-17 15:06:10 · 584 阅读 · 0 评论 -
快速排序
#include #include #include using std::cout; using std::endl; using std::vector; using std::swap; int median(const int& a, const int& b, const int& c) { if ((a = b && b >= c)) return b; else转载 2016-04-08 10:46:29 · 290 阅读 · 0 评论 -
char* 与 char[]
char str[] = "hello world"; 这是分配一个局部数组。。。可修改元素。 char* str = "hello world" 这是分配一个全局数组。。。不可修改元素。 char* strA() { char* str = "hello world"; return str; } int main() { char* str = strA(); cout <<转载 2016-04-12 22:13:46 · 617 阅读 · 0 评论