摘要: #include <stdio.h>struct Base{ virtual void func1() { printf("Base func1()\n"); } virtual void func2() { printf("Base func2()\n"); } virtual void func 阅读全文
posted @ 2017-04-24 16:17 roadmap 阅读(157) 评论(0) 推荐(0)
摘要: #include <stdio.h>struct Person { int age; int height; Person(); void func1(); virtual void func2(); virtual void func3();};Person::Person(){ this->ag 阅读全文
posted @ 2017-04-24 15:09 roadmap 阅读(135) 评论(0) 推荐(0)
摘要: similarity: 1. struct is class, can declare, define field funcion #include <stdio.h>struct Person_s { int age; Person_s(); Person_s(int age); void Set 阅读全文
posted @ 2017-04-23 16:36 roadmap 阅读(190) 评论(0) 推荐(0)
摘要: #include <stdio.h>#include <stdlib.h>#include <time.h>#include <assert.h>#include <assert.h>#include <string.h>enum { BLACK, RED};enum { LEFT, RIGHT}; 阅读全文
posted @ 2017-04-23 15:43 roadmap 阅读(228) 评论(0) 推荐(0)
摘要: NULL 阅读全文
posted @ 2017-04-14 20:27 roadmap 阅读(100) 评论(0) 推荐(0)
摘要: http://ericwang.github.io/program/2010/02/10/c_Variable_length_arrays/ C中的Variable length arrays (变长数组) Variable length arrays 是C99的特性,而不是 C++98 的,关于c 阅读全文
posted @ 2017-04-13 18:21 roadmap 阅读(643) 评论(0) 推荐(0)
摘要: NULL 阅读全文
posted @ 2017-04-12 20:12 roadmap 阅读(89) 评论(0) 推荐(0)
摘要: NULL 阅读全文
posted @ 2017-04-12 13:43 roadmap 阅读(108) 评论(0) 推荐(0)
摘要: NULL 阅读全文
posted @ 2017-04-12 13:43 roadmap 阅读(89) 评论(0) 推荐(0)
摘要: 递归实现: #include <stdio.h>int arr[10] = {3, 2, 4, 1, 9, 7, 5, 6, 0, 8};void print_array(){ int i = 0; for (i = 0; i < 10; i++) printf("arr[%d]:%d ", i, 阅读全文
posted @ 2017-04-12 13:42 roadmap 阅读(120) 评论(0) 推荐(0)