大约有 9,000 项符合查询结果(耗时:0.0111秒) [XML]
fstream默认不支持中文路径和输出整数带逗号的解决办法 - C/C++ - 清泛网 -...
...nclude <iostream>
#include <fstream>
#include <string>
#include <direct.h>
using namespace std;
void main()
{
_mkdir("测试"); //新建一个中文文件夹
ofstream outfile( "测试/test.txt", ios::out ); //创建文件
if( !outfile )
{
cout << "Failed to create file!...
CDHtmlDialog的基本使用(JS调用C++函数的实现) - C/C++ - 清泛网 - 专注IT技能提升
CDHtmlDialog的基本使用(JS调用C++函数的实现)CDHtmlDialog_js_call_cpp_interactiveCDHtmlDialog JS C++一、建立一个新的MFC Application工程,在下面这一步把HTML Dialog给勾上:二、修改工程中的JSCppInteractive.htm,代码如下:<HTML><HEA...一、建立一个...
scoped_ptr 与 auto_ptr 与 shared_ptr 区别总结 - C/C++ - 清泛网 - 专注C/C++及内核技术
scoped_ptr 与 auto_ptr 与 shared_ptr 区别总结1.auto_ptr 被复制后,将失去原来所致资源的所有权;2.scoped_ptr永远不能被复制或被赋值!scoped_ptr拥有它所指向的资源的所有权,并永远不会放弃这个所有权;3.shared_ptr 是可以共享所有权的...
VC/MFC 临界区域使用方法实例 - C/C++ - 清泛网 - 专注C/C++及内核技术
...继续访问共享的资源。
以下为临界区域的使用方法:
*.h头文件:
#include <winbase.h>
CRITICAL_SECTION m_cs_test; ///< 定义一个临界区域对象
*.cpp源文件使用方法:
在类的构造函数内初始化临界区域对象
//该函数必须在任何线程调...
WSAAsyncSelect模型 - C/C++ - 清泛网 - 专注C/C++及内核技术
...cSelect(
SOCKET s, //需要设置的套接字句柄
HWND hWnd, //指定一个窗口句柄, 套接字的通知消息将被发到此窗口中
u_int wMsg, //网络事件到来的ID,可以在WM_USER以上数值中任意指定一个值
long IEvent ...
error LNK2019: 无法解析的外部符号 __imp__PlaySoundW@12,该符号在函数 \...
... __imp__PlaySoundW@12,该符号在函数 "long __stdcall WndProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WndProc@@YGJPAUHWND__@@IIJ@Z) 中被引用#include <mmsystem.h>#pragma comment(lib, "WINMM.LIB")
#include <mmsystem.h>
#pragma comment(lib, "WINMM.LIB")
error LNK2...
sndPlaySound, SND_ASYNC 头文件 - C/C++ - 清泛网 - 专注C/C++及内核技术
sndPlaySound, SND_ASYNC 头文件#include <mmsystem.h>#pragma comment(lib, "winmm.lib")#include <mmsystem.h>
#pragma comment(lib, "winmm.lib")sndPlaySound SND_ASYNC 头文件
XXX.cc:100: error: ‘::strerror’ has not been declared - C/C++ - 清泛网 - 专注C/C++及内核技术
XXX.cc:100: error: ‘::strerror’ has not been declared#include <string.h>解决。#include <string.h> 解决。strerror
CStringArray头文件 - C/C++ - 清泛网 - 专注C/C++及内核技术
CStringArray头文件#include <afxwin.h>#include <afxwin.h>
CStringArray 头文件
获取控件的值的几种方法总结 - C/C++ - 清泛网 - 专注C/C++及内核技术
...gItemText(IDC_EDIT_TEST, str);int d=atoi(str.GetBuffer(0));更优雅的:.h:int m_editTest;.cpp:v...最简单直观的:
CString str;
GetDlgItemText(IDC_EDIT_TEST, str);
int d=atoi(str.GetBuffer(0));
更优雅的:
.h:int m_editTest;
.cpp:
void CxxDlg::DoDataExchange(CDataExcha...