C++
文章平均质量分 71
bigbear802
这个作者很懒,什么都没留下…
展开
-
Reference To Array And Pointer To Array
数组引用和数组指针和两种非常优美而又用途广泛的语言设施,但很多其名气不是很大,因为这两设施C++中新引入的,大家一般不怎么注意的.下面通过一小段代码,来展示其用法. #include iostream>using namespace std;template class T, int size>T _min(T (&r_a)[size]) // 函数模板的形参是数组引用...{原创 2008-02-23 09:56:00 · 454 阅读 · 0 评论 -
An Dispair Phenomenon-Compliers Fail to Implement "Separation Moedl of Function Template"
Most complier fail to implement the compliing mechnisam of function template-separation model, include g++,v s2008. Follow is my test code.in "separation_model.h"#if !defined(SEPARATION_MODEL)#原创 2008-02-24 15:10:00 · 494 阅读 · 0 评论 -
reference to function and pointer to function
Now, you are amazed and you may ask: what is reference to function? A reference to function is a function alias which repersent the function. Follow is a demo of reference to function.template cl原创 2008-02-24 12:15:00 · 497 阅读 · 0 评论 -
Implementation of Heap Sort
Follow is the C++ code of heap sort:templatevoid _heap_sort(T * pUnsort, size_t len) { for (int i = len; i >0; --i) { _make_heap(pUnsort, i); std::swap(pUnsort[0], pUnsort[原创 2008-07-10 09:14:00 · 487 阅读 · 0 评论 -
Interprocess Communication——Using Windows Pipe
// Server.cpp#include #include int main(int argc, char *argv[]){ HANDLE hOldStdin, hOldStdout; // define two variables to record the information of the process to be create原创 2008-07-01 21:20:00 · 755 阅读 · 0 评论