随笔分类 -  C++/CLI

摘要:笔记C++编译器为编译器需要合成Default Constructor的4种情况。1,Class A内含Class B对象,Class A没有Default Constructor时会在编译时合成Default Constructor 在编译期间这个Default Constructor会插入调用... 阅读全文
posted @ 2014-11-17 12:38 dot dot 小点点丶 阅读(215) 评论(0) 推荐(0)
摘要:原文出处:http://blog.csdn.net/daiyutage/article/details/8604720 C语言中由于指针的灵活性,导致指针能代替数组使用,或者混合使用,这些导致了许多指针和数组的迷惑,因此,刻意再次深入探究了指针和数组这玩意儿,其他类型的数组比较简单,容易混淆的是字符... 阅读全文
posted @ 2014-06-14 08:20 dot dot 小点点丶 阅读(224) 评论(0) 推荐(0)
摘要:#include using namespace std; class over{ int i1 , i2 ,i3;public: void init(int I1=0 , int I2 =0, int I3=0); void print();public: over operator ++();//前缀 over operator++(int);//后缀 friend over operator--(over &);//友元前缀 friend over operator--(over & , int );//友元后缀};void over::init(int I1 , int 阅读全文
posted @ 2014-04-02 15:06 dot dot 小点点丶 阅读(389) 评论(0) 推荐(0)
摘要:顺序:1,调用按照声明顺序的基类构造函数2,调用内嵌对象构造函数3,调用自身构造函数(总是先人后己嘛,先老人(基类)后客人(内嵌对象),自己家小孩儿就不要管大人之间的事儿(不调用派生类构造函数))这里C继承B和A,内嵌D,E继承C;调用构造函数情况:测试: 1 #include 2 using namespace std ; 3 class D 4 { 5 public: 6 D(){cout<<"initializing D..."<<endl;} 7 ~D(){cout<<"destroying D..."< 阅读全文
posted @ 2014-03-28 16:59 dot dot 小点点丶 阅读(846) 评论(0) 推荐(0)
摘要:1个工程下有几个类文件,和1个全局的文件comm.h,comm.h中存放了这几个类同时需要的变量和同时调用的函数。当时,我只在comm.h中定义: int commData1; vector commWidth; void GetObjective(vector width, double obj); 而没有加 extern 关键字。出现以下错误:1> comm.cpp1>comm.obj : error LNK2005: "double * FacilityWidth" (?FacilityWidth@@3PANA) 已经在 Individual.obj 中定 阅读全文
posted @ 2014-03-27 11:39 dot dot 小点点丶 阅读(1126) 评论(0) 推荐(0)
摘要:1,中文注释以分号结尾2,Assist X 菜单栏->Assist X Option->Underline 选择“min”。 阅读全文
posted @ 2014-03-27 11:23 dot dot 小点点丶 阅读(299) 评论(0) 推荐(0)
摘要:1 // clrTest1.cpp: 主项目文件。 2 3 #include "stdafx.h" 4 5 using namespace System; 6 using namespace System::Data; 7 8 int main(array ^args) 9 {10 DataTable^ dtable = gcnew DataTable("myTable");11 DataColumn^ column;12 //col 113 column = gcnew DataColumn("begin_time",System: 阅读全文
posted @ 2013-12-25 17:30 dot dot 小点点丶 阅读(573) 评论(0) 推荐(0)
摘要:1 //视图设计器中拖动一个barManager,添加一个bar,再添加一个BarEditItem控件,如下代码: 2 3 private: DevExpress::XtraEditors::Repository::RepositoryItemCheckEdit^ repositoryItemCheckEdit2; 4 private: DevExpress::XtraBars::BarEditItem^ biIsOR; 5 6 7 8 // 9 // biIsOR10 // 11 this->biIsOR->Caption = L"OR";12 th... 阅读全文
posted @ 2013-12-19 11:53 dot dot 小点点丶 阅读(6806) 评论(0) 推荐(0)
摘要:莫名其妙报错需要在.h和.cpp文件中都引用:using namespace System::Collections;using namespace System::Collections::Generic; 阅读全文
posted @ 2013-12-19 10:56 dot dot 小点点丶 阅读(283) 评论(0) 推荐(0)
摘要:初始5个Nodes隐藏23节点,打印全部节点Tag显示23,打印全部节点Tag隐藏全部节点,打印节点TagTreeList.Nodes.Count == TreeList.AllNodesCount;知道这些后,可以通过隐藏节点,不必显示;而保存TreeList所有tag时,还是可以通过TreeList.Nodes[i]来保存隐藏节点的Tag值;注意的是,隐藏时:TreeList.Nodes[i].Visible =false ;TreeList.Nodes[i].Tag.parent = nullptr;TreeList.Ndoes[i].Tag.Visible =false ;不同的是,删 阅读全文
posted @ 2013-12-19 10:51 dot dot 小点点丶 阅读(426) 评论(0) 推荐(0)
摘要:void GetAllDirList(String^ path,List^ list){array^ dirs = Directory::GetDirectories(path); for each(String^ dir in dirs ){FileInfo^ info = gcnew FileInfo(dir);if((info->Attributes & FileAttributes::Hidden) == FileAttributes::Hidden )//过滤掉隐藏文件continue;list->Add(dir);GetAllDirList(dir,list); 阅读全文
posted @ 2013-06-02 14:12 dot dot 小点点丶 阅读(326) 评论(0) 推荐(0)