摘要: #include using namespace std; int main() { int a[3] = {1, 2, 3}; cout << *(a) << std::endl; cout << *(a+ 1) << std::endl; cout << *(... 阅读全文
posted @ 2014-10-26 16:29 zzyoucan 阅读(267) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std; int main() { char a[2];//就是变量的地址 printf("%x", (int)&a[0]); void * p = a;//对于指针显示的就是p存放的地址值,而不是p的地址 pri... 阅读全文
posted @ 2014-10-26 16:09 zzyoucan 阅读(140) 评论(0) 推荐(0) 编辑
摘要: #include void fun1(int*& p)//引用p等于就是传过来的p,引用改变了p也就改变了{ p = new int; *p = 90;}void fun2(int** p)//直接将指针的地址传过来,直接通过指针的地址操作指针{ *p = new int; ... 阅读全文
posted @ 2014-10-26 11:02 zzyoucan 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 今天找了半天delete错误,后来才知道是MTd和MDd模式的问题,MTd的内存申请和释放必须在同一个模块里面,接口上面不能使用stl等,MDd可以使用。改成MDd就可以了 阅读全文
posted @ 2014-10-26 09:08 zzyoucan 阅读(202) 评论(0) 推荐(0) 编辑
摘要: Multithreaded Libraries PerformanceThe single-threaded CRT is no longer ( in vs2005 ) available. This topic discusses how to get the maximum performan... 阅读全文
posted @ 2014-10-26 09:04 zzyoucan 阅读(1526) 评论(0) 推荐(0) 编辑