摘要: 研究C++没多长时间,就从现在开始记录C++工作路上的点点滴滴吧。今天写了一个小测试程序,主要用来理解一下指针函数的用法。上code:#include#include "stdlib.h"#include "string.h"using namespace std;char *getStr(int num){ char *p = (char *)malloc(sizeof(char)*num); strcpy(p, "hello"); return p;}int main(){ int num = 100; char *str = g 阅读全文
posted @ 2014-01-02 20:13 随WW便 阅读(145) 评论(0) 推荐(0) 编辑