上一页 1 ··· 77 78 79 80 81 82 83 84 85 ··· 259 下一页
摘要: 原文 协程化异步网络库是大势所趋. c++20协程是无栈协程,提供了: 1,三个(协待(co_await),co_yield和co_return)新关键字 2,几个新类型:coroutine_handle,coroutine_traits<T...>,suspend_always,suspend_n 阅读全文
posted @ 2022-03-15 13:44 zjh6 阅读(20) 评论(0) 推荐(0)
摘要: 位置 主要有:懒/执行器/生成器/批操作/协程锁/协程条件变量/有栈协程等组件. 简单回声示例 简单异步::协程::懒<空> 会话(传控::套接字 套接字){ 对(;;){ 常 大小型 最大长度=1024; 符 数据[最大长度]; 动[错误,长度]=协待 异步读些(套接字,异网::缓冲(数据,最大长 阅读全文
posted @ 2022-03-15 13:04 zjh6 阅读(31) 评论(0) 推荐(0)
摘要: import std.stdio, std.range; string[] data = [ "Pazartesi", "Pazar"];//... auto toWchar(string str) { ...略//没啥用. } void main() { foreach(date; data) { 阅读全文
posted @ 2022-03-15 10:18 zjh6 阅读(52) 评论(0) 推荐(0)
摘要: L1: foreach (...) { ... switch (auto ret = 重构代码(...)) { case 1: break L1; case -1: continue; }//这样来实现`断/下`. ... } 我写了个CP949转换表,别人建议用shared static this 阅读全文
posted @ 2022-03-15 10:05 zjh6 阅读(27) 评论(0) 推荐(0)
摘要: int printf(char *, ...); int main() { printf("%d\n", (int)sizeof("a")); }//串字面大小. 接着 // test1.c int printf(char *, ...); int main() { int a = 0; // dm 阅读全文
posted @ 2022-03-14 18:03 zjh6 阅读(19) 评论(0) 推荐(0)
摘要: template T(int i=3) { mixin template M(int m) { enum t = i; } } { mixin T!1.M!1; pragma(msg, t); // 1 } { mixin T!().M!1; pragma(msg, t); // 3 } { mix 阅读全文
posted @ 2022-03-12 22:59 zjh6 阅读(17) 评论(0) 推荐(0)
摘要: //raylib.c: #include "raylib.h" //main.d: void main() { import raylib; InitWindow(640,640,"ImportC的raylib测试"); // 循环 CloseWindow(); } 编译: gcc -E rayli 阅读全文
posted @ 2022-03-12 22:14 zjh6 阅读(12) 评论(0) 推荐(0)
摘要: import core.stdc.stdio; class A { void visit(int a){ printf("A - int\n");} void visit(float b) { printf("A - float\n");} } mixin template Bmix(AST) { 阅读全文
posted @ 2022-03-12 22:09 zjh6 阅读(19) 评论(0) 推荐(0)
摘要: 参考这里 先从gitee拉取soui2. 点击soui.08.sln文件. 在mhook项目属性中加上WINDOWS_IGNORE_PACKING_MISMATCH宏.不然有负下标错误. 然后F7编译,就成功了. 阅读全文
posted @ 2022-03-12 13:56 zjh6 阅读(44) 评论(0) 推荐(0)
摘要: 原文 import std; void main() { ubyte[65536] buf; char[] usable_buf = cast(char[]) buf[]; usable_buf.formattedWrite!"Blah %d blah %s"(123, "Это UTF-8 стр 阅读全文
posted @ 2022-03-11 09:45 zjh6 阅读(19) 评论(0) 推荐(0)
上一页 1 ··· 77 78 79 80 81 82 83 84 85 ··· 259 下一页