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

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

截图软件截图区域以外背景变灰的实现--AlphaBlend - C/C++ - 清泛网 - 专注...

...--------画黑色背景---------------- COLORREF bgColor = RGB(0, 0, 0); char alpha = (255 * 30) / 100; int screenX = GetSystemMetrics(SM_CXSCREEN); int screenY = GetSystemMetrics(SM_CYSCREEN); CDC memdc; memdc.CreateCompatibleDC(&dc); CBitmap bmp, *pOldBitmap; bmp.CreateCompatibleBitmap(&...
https://www.tsingfun.com/it/cpp/1633.html 

Unicode and UTF-8 - C/C++ - 清泛网 - 专注C/C++及内核技术

...)、和ASCII码不兼容,而且不太好移植(Not Portable) 例如:char *s=“Good ,北京”;该C语言代码采用UTF-16编码后,字节序列中间有许多’\0’,’\0’ 会被识别为字符串的终止,strlen()函数不起用了。 2)、存储空间较大,...
https://www.tsingfun.com/it/cpp/1823.html 

Linux automake自动编译全攻略 - C/C++ - 清泛网 - 专注C/C++及内核技术

...st.c: #include <stdio.h> #include "lib/calc.h" int main(int argc, char** argv) { int sum = add(1, 2); printf("sum:%d\n", sum); return 0; } 编译及执行结果: 执行: 代码点此下载:automake.zip Linux automake 自动编...
https://www.tsingfun.com/it/cpp/2034.html 

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

...了五种类型、一些宏和通用工具函数。类型例如size_t、wchar_t、div_t、ldiv_t和lldiv_t;宏例如EXIT_FAILURE、EXIT_SUCCESS、RAND_MAX和MB_CUR_MAX等等;常用的函数如malloc()、calloc()、realloc()、free()、system()、atoi()、atol()、rand()、srand()、exit()等等 ...
https://www.tsingfun.com/it/cpp/2205.html 

c/c++ volatile和mutable关键字 - C/C++ - 清泛网 - 专注C/C++及内核技术

...const,其某个成员也可以被修改。如: struct data { char name[30]; mutable int accesses; }; const data veep = {"hello", 0}; strcpy(veep.name, "hel"); //not allowed veep.accessess++; //allowed veep的const限定符进制程序修改veep的成员,但access成员的mut...
https://www.tsingfun.com/it/cpp/2263.html 

去掉std::string或std::wstring最后一个字符的几种简单方法 - C/C++ - 清泛...

...移走最后一个元素。在string/wstring中相当于移走最后一个char/wchar_t。 // 这个方法算是比较简单的了。 // 方法2 s.erase(s.end() - 1); // 删除s的最后一个字符 // 方法3 s = s.substr(0, s.length() - 1); // 取出s从最开始到倒数第二个字符...
https://www.tsingfun.com/it/cpp/2292.html 

ifstream 线程安全读文件 - C/C++ - 清泛网 - 专注C/C++及内核技术

... case EOF: return is; default: t += (char)c; } } } 例子: int main() { std::string path = "end_of_line_test.txt" std::ifstream ifs(path.c_str()); if(!ifs) { std::cout << "Failed to open the file." << std::endl; ...
https://www.tsingfun.com/it/tech/1998.html 

Java 调用外部进程 - 更多技术 - 清泛网 - 专注C/C++及内核技术

... while (c >= 0) { builder.append((char) c); c = inputStream.read(); } } catch (IOException e) { } } }.start(); } } Java 外部进程
https://www.tsingfun.com/it/tech/2282.html 

window+nginx+php-cgi的php-cgi线程/子进程问题 - 更多技术 - 清泛网 - 专注C/C++及内核技术

... /* Pre-fork, if required */ if (getenv("PHP_FCGI_CHILDREN")) { char * children_str = getenv("PHP_FCGI_CHILDREN"); ... So, php with fast-cgi will **never** work on Windows. The question is, why is forking disabled under windows? -------------https://bugs.php.net/bug.ph...
https://bbs.tsingfun.com/thread-491-1-1.html 

Linux automake自动编译全攻略 - 脚本技术 - 清泛IT社区,为创新赋能!

...nclude &lt;stdio.h&gt; #include &quot;lib/calc.h&quot; int main(int argc, char** argv) { &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;int sum = add(1, 2); &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;printf(&quot;sum:%d\n&quot;, sum); &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp;r...