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

https://www.tsingfun.com/it/cpp/1483.html 

stdbool.h C99标准杂谈 - C/C++ - 清泛网 - 专注C/C++及内核技术

...定义宏: #define true 1 #define false 0 #define bool _Bool typdef int _Bool 但是很遗憾,Visual C++不支持C99,至少现在来看是没这个计划(参见http://en.wikipedia.org/wiki/C99)。所以stdbool.h就不能在vc里面用: http://msdn.microsoft.com/en-us/library/02y9a5ye...
https://www.tsingfun.com/it/cpp/1500.html 

C++在堆上申请二维数组 - C/C++ - 清泛网 - 专注C/C++及内核技术

...间不能连续且需要多个指针才能管理 double *d[m]; for (int i=0; i<m; i++) d = new double[n]; C++ 堆 二维数组
https://www.tsingfun.com/it/cpp/1515.html 

解决:Successful WSAStartup not yet performed. Error code : 10093. - C...

...: BOOL CxxxApp::InitInstance() { WSADATA wsaData; int res = WSAStartup(0x202, &wsaData); if (res) { AfxMessageBox("WSAStartup filed. [CxxxApp::InitInstance()]", 0); return false; } ... } WSAStartup 10093
https://www.tsingfun.com/it/cpp/1536.html 

关于 __VA_ARGS__ 宽字符版本的问题 - C/C++ - 清泛网 - 专注C/C++及内核技术

... Log(__FUNCTION__, __LINE__, (x), __VA_ARGS__) void Log(LPCSTR func, INT line, LPCTSTR fmt, ...) { // 设置地域,不然_vftprintf_s写不了中文 setlocale(0, "chs"); FILE *fp = NULL; va_list args; va_start(args, fmt); // 中间无关紧...
https://www.tsingfun.com/it/cpp/1614.html 

在ATL无窗口ActiveX 控件中如何使用定时器? - C/C++ - 清泛网 - 专注C/C++及内核技术

...TimerProc( HWND hwnd, // 定时器消息的窗口句柄 UINT message, // WM_TIMER 消息 INT_PTR idTimer, // 定时器标志 DWORD dwTime) // 当前系统启动计时 { ... } 调用方法: UINT nRet = SetTimer(NULL, // handle to main window...
https://www.tsingfun.com/it/cpp/1874.html 

字符串指针变量与字符数组的区别 - C/C++ - 清泛网 - 专注C/C++及内核技术

... char *name; scanf("%s",name); printf("%s",name); 有的编译器虽然也能通过,但这是错误的,因为是个指针,定义时指向不可用的地址。解决这个问题有两种方法:用数组的方法或给字符针针分配内存空间的方...
https://www.tsingfun.com/it/cpp/1902.html 

c++文件流基本用法(ifstream, ostream,fstream) - C/C++ - 清泛网 - 专注C/C++及内核技术

...include <fstream.h> void main { ifstream file; char output[100]; int x; file.open("file.txt"); file>>output; cout<<output; file>>x; cout<<x; file.close(); } 上面所讲的ofstream和ifstream只能进行读或是写,而fstream则同时提供读写的功能...
https://www.tsingfun.com/it/cpp/2033.html 

atol 头文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...t char *nptr); 实例: #include <stdlib.h> #include <stdio.h> int main(void) { long l; char *lstr = "98765432"; l = atol(lstr); printf("string = %s integer = %ld\n", lstr, l); return(0); } atol 头文件
https://www.tsingfun.com/it/cpp/2034.html 

Linux编程中各种头文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

...例如: struct hostent *gethostbyaddr(const void *addr, size_t len, int type); struct hostent *gethostbyname(const char *name); sys/types.h:数据类型定义 sys/socket.h:提供socket函数及数据结构 netinet/in.h:定义数据结构sockaddr_in arpa/inet.h:提供IP地址转...
https://www.tsingfun.com/it/cpp/2093.html 

error C2662: “Screen::move”: 不能将“this”指针从“const Screen”转...

...display(std::ostream &os) const {os<<contents;} //main中处理 int main() { Screen myScreen(5,3); const Screen blank(5,3); //调用非const版本display myScreen.display(cout).set('#').display(cout); cout << endl; //调用 const版本display blank....