大约有 16,000 项符合查询结果(耗时:0.0216秒) [XML]

https://www.tsingfun.com/it/cp... 

浮点数在内存中的表示 - C/C++ - 清泛网 - 专注IT技能提升

...子: #include "stdafx.h" #include <string.h> #include <limits> int _tmain(int argc, _TCHAR* argv[]) { float f1 = FLT_MIN; printf("%f\n", f1); f1 = FLT_MAX; printf("%f\n", f1); // 0 10000101 11110110000000000000000 void * p = (void *)0x42fb0000; memcpy(&f1, &p, 4); printf...
https://www.tsingfun.com/it/cpp/664.html 

NtMapViewOfSection注入 - C/C++ - 清泛网 - 专注C/C++及内核技术

...l *func_NtMapViewOfSection) ( HANDLE, HANDLE, LPVOID, ULONG, SIZE_T, LARGE_INTEGER*, SIZE_T*, SECTION_INHERIT, ULONG, ULONG ); func_NtMapViewOfSection NtMapViewOfSection = NULL; LPVOID NTAPI MyMapViewOfFileEx( HANDLE hProcess, HANDLE hFileMappingObject, DWORD dwDesiredAccess, DWORD dwFileOff...
https://www.tsingfun.com/it/cpp/670.html 

fstream默认不支持中文路径和输出整数带逗号的解决办法 - C/C++ - 清泛网 -...

... if( !outfile ) { cout << "Failed to create file!"; return ; } int i = 123456789; outfile << "i = " << i << "/n"; //输出带逗号 outfile.close(); setlocale( LC_ALL, "C" ); //恢复全局locale,如果不恢复,可能导致cout无法输出中文 } 创建文...
https://www.tsingfun.com/it/cp... 

ATL CComPtr和CComQIPtr详解 - C/C++ - 清泛网 - 专注IT技能提升

...值给CComQIPtr的时候,CComQIPtr会自动的调用接口指针的QueryInterface接口,来获得对应的正确的接口指针。CComPtr和CComQIPtr是智能接口指针类,它们在销毁的时候,不需要手动去释放接口指针,在赋值的时候,也不需要手动的AddRef,在...
https://www.tsingfun.com/it/cpp/1237.html 

C++ template中typename和class的区别 - C/C++ - 清泛网 - 专注C/C++及内核技术

...时除外。 For example: using namespace std; template <class T> int vcount(vector<T> v) { int i; typename vector<T>::iterator vi; for(i=0,vi=v.begin(); vi!=v.end(); i++,vi++) ; return(i); } 更详细的可以参考MSDN资料: http://blogs.msdn.com/b/sli...
https://www.tsingfun.com/it/cpp/1350.html 

c++获取windows程序的版本号 - C/C++ - 清泛网 - 专注C/C++及内核技术

...clude <windows.h> #include <atlstr.h> #pragma comment(lib, "version") int _tmain(int argc, _TCHAR* argv[]) { LPCTSTR lpszModuleName = _T("C:\\Windows\\notepad.exe"); // Get the version information size for allocate the buffer DWORD dwHandle; DWORD dwDataSize = ::GetFileVersi...
https://www.tsingfun.com/it/cpp/1447.html 

WSAAsyncSelect模型 - C/C++ - 清泛网 - 专注C/C++及内核技术

...柄,当有网络事件发生时,便向这个窗口发送消息。 int WSAAsyncSelect( SOCKET s, //需要设置的套接字句柄 HWND hWnd, //指定一个窗口句柄, 套接字的通知消息将被发到此窗口中 u_int wMsg, //网络事件到来...
https://www.tsingfun.com/it/cpp/1494.html 

std::vector排序 - C/C++ - 清泛网 - 专注C/C++及内核技术

std::vector排序若vector内容进行过比较运算符重载(如int, std::string等),则直接sort:std::sort(vecTest.begin(), vecTest.end())默认升序。其他情...若vector内容进行过比较运算符重载(如int, std::string等),则直接sort: std::sort(vecTest.begin(), ve...
https://www.tsingfun.com/it/cpp/1495.html 

VC/Linux C++ 递归访问目录下所有文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...{ GetFileInDir(dirName + file->d_name); } } } int main(int argc, char* argv[]) { if (argc < 2) { cerr << "Need Directory" << endl; exit(1); } string dir = argv[1]; GetFileInDir(dir); } C++ VC 递归目录
https://www.tsingfun.com/it/cpp/1514.html 

std::string截取字符串,截取ip:port - C/C++ - 清泛网 - 专注C/C++及内核技术

std::string截取字符串,截取ip:portstd::string ip("127.0.0.1:8888");int index = ip.find_last_of(':'); 获取ipip.substr(0, index).c_str(); 获取portip.substr(index + 1).c_str();std::string ip("127.0.0.1:8888"); int index = ip.find_last_of(':'); // 获取ip ip.substr(0, index).c_str();...