摘要: 分层分装#include <iostream>using namespace std;__device__ int offset = 1;struct A_device { int mH; int mW; int *m_d_Dynamic; int mDynamicSize; int func( int );};class A {public: A_device d; int *m_h_Dynamic; A(): d((A_device){0,0,NULL,sizeof(int) * 4}), m_h_Dynamic(NULL) { allocMem(); } ~A() { fre 阅读全文
posted @ 2011-04-19 10:04 soulnearby 阅读(194) 评论(0) 推荐(0) 编辑
摘要: C++ Primer 4th Edition01. initialization int ival(1024); //direct-initialization !! int ival = 1024; //copy-initialization02. EOF: Windows -- ctrl+z Unix/MacOS -- ctrl+d03. manipulator: std::endl04.sizeof(wchar_t) = 405.对象=有类型的内存区域06. 文件中全局作用域里定义的变量:非const变量,可见性默认是extern的;const变量,可见性默认是当前文件的;07. hea 阅读全文
posted @ 2011-04-19 09:14 soulnearby 阅读(247) 评论(0) 推荐(0) 编辑