上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 56 下一页
摘要: SetWindowText(_T("MFC 测试")); // 设置窗体标题 CString str; GetWindowText(str); // 获取窗体标题内容 /********************************************************/ CString 阅读全文
posted @ 2024-02-26 13:34 double64 阅读(34) 评论(0) 推荐(0)
摘要: 浅拷贝 静态数组的空间体现深拷贝的效果 #include <iostream> #include <string> using namespace std; #define SEX_SIZE 10 class Student { public: Student(string name) { Age 阅读全文
posted @ 2024-02-24 09:54 double64 阅读(24) 评论(0) 推荐(0)
摘要: C#: static void Main(string[] args) { bool result = true; result &= Func(); result &= Func(); result &= Func(); Console.WriteLine("&= 最后结果:{0}\n", res 阅读全文
posted @ 2024-02-23 08:55 double64 阅读(15) 评论(0) 推荐(0)
摘要: 成员变量关联: private: CMFCButton m_btnColorTest; CMFCButton* m_pBtnColor; // CMFCAppColorDlg 对话框 #define DELETE(ptr) do{if (ptr) {delete ptr; ptr = nullptr 阅读全文
posted @ 2024-02-19 19:22 double64 阅读(333) 评论(0) 推荐(0)
摘要: #include "afxwin.h" #include <iostream> using namespace std; int main() { CString cs = _T("西游记"); AfxMessageBox(_T("CString:") + cs); // CString 转 ACS 阅读全文
posted @ 2024-02-19 14:23 double64 阅读(397) 评论(0) 推荐(0)
摘要: #include <iostream> using namespace std; typedef int INT, * PINT; typedef int* PINT32, INT32; int main() { int* p, a; a = 10; p = &a; cout << *p << en 阅读全文
posted @ 2024-02-19 13:29 double64 阅读(31) 评论(0) 推荐(0)
摘要: ▲ Demo 示例 新建基于对话框的 Demo程序。 头文件: // 自定义数据类型,用来测试消息数据传递 typedef struct tagStudent { CString Name; int Age; }Student_t; // Dlg header public: afx_msg voi 阅读全文
posted @ 2024-02-05 17:18 double64 阅读(103) 评论(0) 推荐(0)
摘要: #include "Windows.h" #include <stdlib.h> #include <stdio.h> DWORD WINAPI ThreadFunc(LPVOID param) { printf("启动线程\n"); return 0; } int main() { DWORD t 阅读全文
posted @ 2024-02-05 13:10 double64 阅读(21) 评论(0) 推荐(0)
摘要: 测试类: #pragma once ref class Hello { public: Hello(); ~Hello(); !Hello(); }; /***************/ #include "Hello.h" Hello::Hello() { System::Console::Wri 阅读全文
posted @ 2024-02-04 22:40 double64 阅读(154) 评论(0) 推荐(0)
摘要: 数组形参会退化成指针,指向数组的第一个元素。 #include <stdio.h> void ShowBooksName(char* names[], int len) { for (int i = 0; i < len; ++i) { puts(names[i]); } } void TestSi 阅读全文
posted @ 2024-01-28 23:23 double64 阅读(17) 评论(0) 推荐(0)
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 56 下一页