C/C++
文章平均质量分 67
xia851773277
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
简单Win32程序示例
#include#includeLRESULT CALLBACK MyWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch(uMsg) { case WM_LBUTTONDBLCLK: MessageBox(hWnd,"dbClick","",MB_YESNO); case WM_L原创 2016-04-29 19:36:01 · 550 阅读 · 0 评论 -
进程通信_剪贴板
void CClipboardDlg::OnBtnSend() { // TODO: Add your control notification handler code here if(OpenClipboard()) { CString str; HANDLE hClip; char *pBuf; EmptyClipboard(); GetDlgI原创 2016-04-29 21:55:44 · 305 阅读 · 0 评论 -
进程通信_匿名管道
服务器端:void CParentView::OnPipeCreate() { // TODO: Add your command handler code here SECURITY_ATTRIBUTES sa; sa.bInheritHandle=TRUE; sa.lpSecurityDescriptor=NULL; sa.nLength=sizeof(SECURI原创 2016-04-29 21:53:46 · 313 阅读 · 0 评论 -
拷贝构造函数与赋值构造函数
#include#includeusing namespace std;class String{private: char *m_data;public: String(const char *str); String(const String &other); String & operator=(const String &other); ~Str原创 2016-04-29 21:48:24 · 240 阅读 · 0 评论 -
关键代码段(临界区)实现线程死锁
#include #include DWORD WINAPI Fun1Proc( LPVOID lpParameter // thread data);DWORD WINAPI Fun2Proc( LPVOID lpParameter // thread data);int tickets=100;CRITICAL_SECTION g_csA;C转载 2016-04-29 21:46:54 · 705 阅读 · 0 评论 -
操作符重载及友元函数
#includeusing namespace std;class Students{private: int age; int weigth;public: Students(); Students(int age,int weigth); Students operator+(const Students &stu) const; friend vo原创 2016-04-29 20:06:58 · 355 阅读 · 0 评论 -
istringstream用法
//istringstream对象可以绑定一行字符串,然后以空格为分隔符把该行分隔开来#include#include#include//头文件using namespace std;void main(){ string str; while(getline(cin,str)) { std::istringstream tmpStream(str);原创 2016-04-29 20:04:12 · 495 阅读 · 0 评论 -
Android手机震动
package com.example.vibrate;import android.app.Activity;import android.app.Service;import android.os.Bundle;import android.os.Vibrator;import android.view.Menu;import android.view.MenuItem原创 2016-04-29 20:00:47 · 381 阅读 · 0 评论 -
查找某一目录下的所有文件名
#include#include#include#include#includeusing namespace std;vector pathList;void GetFilePath(string path){ struct _finddata_t fileInfo; long hFile = 0; string fileName; string原创 2016-04-29 19:56:44 · 559 阅读 · 0 评论 -
CArchive类基本读写
#include#includeusing namespace std;void ArchiveRead(){ CFile file("C:\\Users\\Administrator\\Desktop\\test.txt",CFile::modeRead); CArchive ar(&file,CArchive::load); int i; char ch;原创 2016-04-29 19:53:41 · 1090 阅读 · 0 评论 -
C++中多字节与双字节的字符的转换
#include#include#includeusing namespace std;void c2w(const char *pchar, wchar_t *pwchar,int len){ int clen = strlen(pchar) + 1; int wclen = MultiByteToWideChar(0,0,pchar,clen,NULL,0);原创 2016-04-29 19:51:17 · 2520 阅读 · 0 评论 -
配置文件的读写
#include#includeusing namespace std;typedef struct school{ char name[20]; int time;};void main(){ char *filePath = "C:\\Users\\Administrator\\Desktop\\config.ini"; int age; cha原创 2016-04-29 19:45:54 · 296 阅读 · 0 评论 -
事件对象实现线程同步
#include #include DWORD WINAPI Fun1Proc( LPVOID lpParameter // thread data);DWORD WINAPI Fun2Proc( LPVOID lpParameter // thread data);int tickets=100;HANDLE g_hEvent;void mai原创 2016-04-29 21:57:59 · 326 阅读 · 0 评论
分享