摘要:#include #include #include #include #include #include using namespace std; int main() { // demonstrate reverse an int array int a[4] = {3,2,4,1}; reverse(a,a+4); cout...
阅读全文
摘要:#include #include #include #include #include using namespace std; int main() { stack> s; queue> q; // the default container of queue is deque for (int i = 0; i < 10; i++) { ...
阅读全文
摘要:#include #include using namespace std; // rever letters of a string char * strRevert1 (char * src) { if (src == NULL) return NULL; int len = strlen(src); for (int i=0; i= pWord); ...
阅读全文
摘要:#include #include using namespace std; int strcmp1 (const char * a, const char * b) { int ret = 0; while (!(ret=*a-*b) && *b) { ++a; ++b; } return (ret>0)?(1):((...
阅读全文